Open dancherb opened 3 years ago
It seems like this isn't related to <ScrollLock/>
- just putting any elements inside <TouchScrollable>
prevents their scrolling on mobile, without a <ScrollLock/>
anywhere in the document or project.
I have the same issue
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. add react hooks、vue3 example
npm i body-scroll-lock-upgrade
repair log,Refer to the releases page. @Lukavyi @dancherb
When putting the element on my page in any form, the following errors call:
this.scrollableArea.addEventListener is not a function
this.scrollableArea.removeEventListener is not a function
I'm using it as the docs suggest, in a modal component:
What I'm trying to achieve: currently the scroll lock works great on standard web by just including when necessary on my root screen. As suggested by the docs, it's not playing well on mobile - even the modals become locked from touch scrolling.
Update: seems like the error only occurs when you use a custom child component (i.e. View) - div doesn't cause the error. However, touch scrolling is still locked in the modal when it shouldn't be (standard mouse scrolling in Chrome simulator, and on desktop browsers, still works fine).