-
Notifications
You must be signed in to change notification settings - Fork 32
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
Search: Mobile overlay does not properly lock the screen in place #371
Comments
Upstream followup: WordPress/gutenberg#49369 |
#381 ended up having some unintended consequences, but I think I'm on a better path with #382. It still needs more testing, though. FYI @jasmussen in case any of that impacts your upstream PR. I needed to set It might also be worth experimenting with some of the styles in #382 instead, since that might preserve the scrolling position. I haven't tested that, though, it's very possible that those styles are worse for a standard theme. |
I paused working on it because launching WP20 became a higher priority. I was planning to circle back once there's nothing left for me to do there, but I don't mind if someone else wants to pick it up in the meantime. |
Some more details — this is happening only on the search modal and only when the keyboard is open. It sounds like this is something of a known issue with iOS, that opening the keyboard forces a scroll on the page. I found this article, The Eccentric Ways of iOS Safari with the Keyboard, the problem description is good though the "solutions" aren't really applicable to us. That said, in my testing, @iandunn What issues were you seeing with the |
I think it was this: wporg-mu-plugins/mu-plugins/blocks/global-header-footer/postcss/header/header.pcss Lines 24 to 28 in 36079b2
IIRC that only happens because we're using the Nav block in an unexpected way, where the modal is open on desktop views for the search block. wporg-mu-plugins/mu-plugins/blocks/global-header-footer/header.php Lines 96 to 103 in 482d0c7
|
I saw that comment but couldn't replicate it, do you remember what browser you saw it on? |
Demo video:
Upload.from.GitHub.for.iOS.MOV
This appears to be an upstream Gutenberg issue (I'll ticket separately), but worth fixing locally in the meantime. When the navigation block opens an overlay, a CSS class gets applied to the HTML element:
As best I recall, this used to be sufficient to prevent Mobile Safari from scrolling the parent content, but it appears not. We should see if additional fixes would address this, perhaps:
☝️ I will separately vet whether that fixes it, and follow up.
The text was updated successfully, but these errors were encountered: