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 horizontal scroll in child element on IOS #434

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AdamMerrifield
Copy link
Contributor

With the current implementation of useLockScroll child elements with overflow-x of 'auto' | 'scroll' on IOS are prevented and scrolling in these panels do not function well. I only found this as an issue with IOS.
The modifications here will check for both X and Y overflow on the parent elements of the event target.

You can see an example on an IOS device here https://stackblitz.com/edit/github-s2cpc5?file=src%2Fcomponents%2FMyModal.vue

based on willmcpo/body-scroll-lock#133

this allows for short circuiting the `hasAnyScrollableEl` function if it finds a scrollable element and stop checking parents
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.

None yet

1 participant