-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fixed: zoom out can hide the scrollbar #65771
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Does this take into account the media querries issue detailed by @stokesman in the original issue? |
yes i think it does take in the account as the below screenshot is same as the issue which was reproduce but this time it does not have the mobile menu and also the scrollbar is visible. |
Thanks for the PR 👍 Are you able to going in to some more detail on why what you describe above solves the issue? I'd like to understand the solution a bit better but as it's a one-line code change that's quite challenging. Many thanks. |
Hi @getdave, I’ve updated the condition for isZoomout so that the zoom-out preview container width matches the container width. Since the container width is dynamically calculated, I thought setting the zoom-out preview width the same would allow the scrollbar to automatically adjust within the window. This worked well and resolved this issue, as well as #65654. However, after reading @stokesman comment, I now understand the issue with the media query more clearly. The zoom-out preview width shouldn’t change inside the iframe, but by altering the condition, it does, which triggers the mobile view. Now, the question is whether this solution is valid or not. I still believe we need to adjust the condition to maintain the width so the scrollbar appears. I’d love to hear your thoughts on this, and if this approach isn’t correct, I’d appreciate any suggestions for an alternative solution. Thanks! |
I believe this problem will be solved by #66034. I think we should continue over there. What do you think @dhruvang21? |
Yes, sure @getdave, we can proceed with the PR you mentioned above. |
Based on the fact that #65595 is now closed and:
I think we can close this PR, correct? @dhruvang21 |
What?
fixes the issue of scrollbar gets hidden when block inserter sidebar is open while zoomout view is enabled
Closes #65595
Why?
This PR fixes the issue of scrollbar gets hidden when block inserter sidebar is open while zoomout view is enabled
How?
When zoomout view is enabled we maintain the prevContainerWidthRef.current = containerWidth in the iframe.
Testing Instructions
Screenshots or screencast
issue-65595.webm