willmcpo / body-scroll-lock

Body scroll locking that just works with everything 😏
MIT License
4.04k stars 339 forks source link

IOS Safari scroll bug #190

Open stefanvonderkrone opened 4 years ago

stefanvonderkrone commented 4 years ago

Video: https://imgur.com/a/1q90HoS

This video demonstrates an issue with Safari on iOS where body-scroll-lock cannot do anything to prevent the scrolling of the body if you're swiping at the very bottom. This doesn't seem to happen with all browser bars visible, but when they're hidden.

This issue seems to be related to #177

The problem occurs on a vertical swipe at the very bottom when the browser bars are hidden. And some event-listeners on document or document.body indicate that you cannot prevent this behavior. There is no touchmove oder touchstart event dispatched.

I should probably issue this case to the Webkit Bugtracker, but I think you should be aware of it as well.

A quick test on Chrome for iOS indicates, that this bug doesn't occure there. So it really seems to be solely related to Safari on iOS.

diachedelic commented 4 years ago

Looks like a regression of this well known bug: https://benfrain.com/the-ios-safari-menu-bar-is-hostile-to-web-apps-discuss/ - I wouldn't be surprised if it's already sitting in the webkit bug tracker.

rick-liruixin commented 1 year ago

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.

npm i body-scroll-lock-upgrade

repair log, Refer to the releases page.