willmcpo / body-scroll-lock

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

Scrolling enabled in browser as soon as enableBodyScroll is called once, regardless of number of locks #235

Open silvenon opened 3 years ago

silvenon commented 3 years ago

Hey! I'm having a little trouble understanding how enabling scrolling is intended to work in this library. I see that elements are being tracked in the locks array, but this is only used for scrolling on mobile; in the browser scrolling enables as soon as I call enableBodyScroll, I would expect scrolling to be enabled once the last "lock" is cleared. 🤔

diachedelic commented 3 years ago

An astute observation! Can anybody provide some insight?

silvenon commented 2 years ago

Would you accept a PR?

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.