-
Notifications
You must be signed in to change notification settings - Fork 338
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
Doesn't work on iOS mobile devices #204
Comments
Are you talking about the this demo? |
Have you got your target element set as the element that is meant to carry on scrolling? i.e. the element with overflow: auto I was experiencing exactly the same issue you are and it was because I was accidentally targeting the parent element to the div actually doing the scrolling. |
Exactly this demo doesn't work on iOS 14.2. Once you first scroll down a bit to hide the bottom safari navigation bar and then open the modal, one can still scroll the body. |
could you have a look at this pull request and see if that solves your problem? |
Hellow, I have the same problem. Please, can you say how did you fixed this. |
Hi, @snowsergo please make sure you are testing with the branch from this pull request: #229. That branch contains the latest fixes which are not yet merged to the main branch. |
To enable scrolling of target elements on iOS, you need to enable it in options. disableBodyScroll(currentReference, { allowTouchMove: () => true }); |
@charkour This works at the expense of re-enabling body scroll behind the modal it seems |
@bradleykhan, yeah you're right. This package is a little buggy and it appears to be no longer maintained. My team is looking for a better solution but this is the best we've found for now. Thanks for your comment! |
@charkour Did you try https://github.com/tuax/tua-body-scroll-lock? |
@diachedelic, hi! Yeah, we initially tried that too but ran into issues when trying to use multiple locks. Didn't try too long. Seemed to work better than this package in more cases so it's worth a shot in my opinion! |
@bradleykhan,They stopped the repairs. I had to do it myself, in the same way, with a new version of typeScript. And fix these problems for everyone to use.
repair Changelog |
repair log, Refer to the releases page. |
Works great on desktop browsers and the mobile device view in Chrome's dev tools.
On iOS Safari, Chrome and Firefox, the body scroll locks but I'm unable to scroll in the modal opened by touching. Two-finger scroll seems possible but is buggy and also scrolls in the body element.
The text was updated successfully, but these errors were encountered: