fix: prevent iOS Safari global overscroll with modern CSS - #24
Open
Huxpro wants to merge 1 commit into
Open
Conversation
iOS Safari 11.3+ defaults touchmove listeners on document/body to
passive, silently ignoring preventDefault(). This caused the native
elastic overscroll to leak through despite the app's custom scroll
implementation.
Changes:
- Add overscroll-behavior: none on html/body and #wrapper to disable
native overscroll bounce via CSS (supported since iOS Safari 16)
- Add touch-action: none on body and #wrapper to tell the browser
not to handle any default touch gestures
- Set html to position: fixed to lock the viewport on iOS Safari
- Use addEventListener with { passive: false } instead of Zepto .on()
for the touchmove prevention listener, ensuring preventDefault()
is actually honored
- Add viewport-fit=cover to viewport meta for notched devices
https://claude.ai/code/session_01QJx2mW2xD7CvJMQNddUTGo
✅ Deploy Preview for html-clear ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
iOS Safari 11.3+ defaults touchmove listeners on document/body to passive, silently ignoring preventDefault(). This caused the native elastic overscroll to leak through despite the app's custom scroll implementation.
Changes:
https://claude.ai/code/session_01QJx2mW2xD7CvJMQNddUTGo