perfect-scrollbar
perfect-scrollbar copied to clipboard
Perfect scrollbar prevents parents from scrolling on touchmove
I prepared a fiddle which demonstrates the problem https://jsfiddle.net/xcg697p8/25/
There, you can see that I have two scroll containers in a wrapper, which is being x-overflowed by them. The scroll containers are only allowed to scroll vertically. Now when I scroll horizontally in the wrapper with a mouse pointer, it works just fine, but if I try to do a horizontal swap upon those scroll containers on a touch device, the scrolling is prevented.
It turns out this line is preventing default on the touchmove event https://github.com/utatti/perfect-scrollbar/blob/62014bd11296cf13c767fa9bc258a21d2f6ddfa9/src/handlers/touch.js#L169
I understand why, but I would love to have an option to disabled the preventDefault
and be able to scroll the parent also.