willmcpo / body-scroll-lock

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

iOS 16 Safari has width/size issues with wide content #261

Open joshuacurtiss opened 2 years ago

joshuacurtiss commented 2 years ago

On iOS 16 Safari only, the width of the page will be incorrectly adjusted to be very wide when activating the scroll lock. On a mobile responsive page, this correspondingly causes fonts and other content to rearrange/resize. Interestingly, when deactivating the scroll lock, the content does not return to its original size.

This appears to be a Safari bug but occurs because this package does not set the right style of body when activating the scroll lock.

Sample buggy behavior

A page that does not have right: 0 set in the CSS and has wide content:

BSL-bug

Expected behavior:

BSL-expected

yokuze commented 2 years ago

@willmcpo For what it's worth, I'm seeing this issue too and #262 fixes it.

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.