react-scrolllock icon indicating copy to clipboard operation
react-scrolllock copied to clipboard

TouchScrollable working only with vertical scrolling

Open Krasnopir opened this issue 6 years ago • 7 comments

If we have an element with horizontal scrolling, it is possible to force TouchScrollable to scroll an element only by forcing not only the width limit, but also the height limit, in which the nested block must be at least 1 pixel more, then it works.

Krasnopir avatar Feb 19 '19 11:02 Krasnopir

Please provide a CodeSandbox reproduction.

jossmac avatar Feb 19 '19 23:02 jossmac

I marked the place where you need to change the value to enable scroll https://codesandbox.io/s/8pnlp437v8

Krasnopir avatar Feb 21 '19 17:02 Krasnopir

I'm seeing this in mobile devices where the height of a modal with a slideshow and captions is taller than the viewport height, if it's smaller than the viewport height it scrolls horizontally just fine, as soon as it hits a slide with content that's too tall swiping stops working

disabling scrollock in mobile is my current workaround

eballeste avatar Mar 19 '19 20:03 eballeste

also want to add that before disabling touch scrollable for mobile, I was doing tests thinking that it was some bug with the slider script, so I started by trying to manually trigger the previous/next methods of the slider by listening in on the touchstart/touchend events, only touchstart would fire. will try to recreate a sandbox once I have some free time but wanted to share this in the meantime in case it helps somehow

eballeste avatar Mar 20 '19 15:03 eballeste

relates to #42 Library seems abandoned though

Eugene-Musika avatar Aug 19 '21 12:08 Eugene-Musika

And also here is mine pull request with fix of current issue #98

Eugene-Musika avatar Aug 19 '21 13:08 Eugene-Musika

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.

rick-liruixin avatar Dec 01 '23 14:12 rick-liruixin