Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix in game safari webview gridpicker height #10276

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

riknoll
Copy link
Member

@riknoll riknoll commented Nov 19, 2024

for whatever reason, the safari webview in minecraft is returning 0 for window.outerHeight but a correct number for window.innerHeight. this is definitely a browser bug given that the outerHeight should always be a bigger number than innerHeight as the name suggests.

this was causing both the block picker being too tall error and the animal picker being too short error. the difference between the two was that the block picker has the search bar, which was causing the div to be given a negative height whereas the animal picker was getting a height of 0

@riknoll riknoll requested a review from a team November 19, 2024 01:09
@riknoll riknoll merged commit 0ef98af into master Nov 19, 2024
7 checks passed
@riknoll riknoll deleted the dev/riknoll/safari-gridpicker-madness branch November 19, 2024 01:20
@abchatra
Copy link
Collaborator

@riknoll just curious, how does it work in live?

@riknoll
Copy link
Member Author

riknoll commented Nov 20, 2024

good question! i'll try and debug it

@riknoll
Copy link
Member Author

riknoll commented Nov 20, 2024

the old one was using one of the old closure APIs, goog.dom.getViewportSize(), which is no longer included in blockly. looks like that function was using the document element and getting the client height/width instead of checking the window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants