body-scroll-lock icon indicating copy to clipboard operation
body-scroll-lock copied to clipboard

Safari toolbars on iOS 15 show and hide when scrolling within a scrollable element

Open alexfoxy opened this issue 3 years ago • 6 comments

Testing the modal example on iOS 15 safari. Even though the body is locked in scroll position Safaris toolbars disappear / re-appear when scrolling inside a scrollable element. See video: https://user-images.githubusercontent.com/151772/136651702-113ee9db-3e0c-4c33-b161-ad676a39c27d.mov

This is present in iOS 15.1 beta 3 also.

alexfoxy avatar Oct 09 '21 11:10 alexfoxy

The latest version body-scroll-lock has not been uploaded to npm. The problem was that: from document.body.style.top = -scrollY; document.body.style.left = -scrollX; to document.body.style.top = ${-scrollY}px; document.body.style.left = ${-scrollX}px;

If you use the code from github, then everything will work correctly. But if you download from npm, you will get a bug.

PASHANSX avatar Oct 09 '21 16:10 PASHANSX

I tried out the latest version from the repository and it is still an issue on iOS 15: https://codesandbox.io/s/bsl-ios15-z647i

alexfoxy avatar Oct 11 '21 06:10 alexfoxy

Same here on 15.0

benoitbohnke avatar Oct 12 '21 14:10 benoitbohnke

Pls update banner in readme https://imgur.com/Wyl0Erw

One1L avatar Dec 10 '21 09:12 One1L

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.

rick-liruixin avatar Apr 15 '23 07:04 rick-liruixin

最新版本的 body-scroll-lock 还没有上传到 npm。 问题在于 from document.body.style.top = -scrollY; document.body.style.left = -scrollX; 到 document.body.style.top = ${-scrollY}px; 文档.body.style.left = ${-scrollX}px;

如果你使用来自 github 的代码,那么一切都会正常工作。但是如果你从 npm 下载,你会遇到一个错误。

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.

rick-liruixin avatar May 06 '23 03:05 rick-liruixin