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

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

Open silvenon opened this issue 3 years ago • 3 comments

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. 🤔

silvenon avatar Oct 04 '21 20:10 silvenon

An astute observation! Can anybody provide some insight?

diachedelic avatar Oct 05 '21 02:10 diachedelic

Would you accept a PR?

silvenon avatar Oct 19 '21 19:10 silvenon

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