HTML div scrolling with enabled touch
Hello,
is there a way how to keep div with overflow:auto scrollable with touch gestures enabled? I've spent couple of hours on this issue and I'm not sure if that's even possible.
My idea is that dragging inside of that div would cause normal scrolling of it's contents while dragging outside would enable normal touch gestures.
Thanks
Hi,
Have you tried adding data-selectable="true" attribute to your html element?
Yes, I've tried that, but UX is actually worse than touch:{vertical:false,momentum:true}.
Ideally, horizontal gestures should work as usual and vertical only after container is scrolled fully in either direction. Or keep behavior of data-selectable="true" only for vertical gestures and allow horizontal gestures to work normally.
If I understand you correctly, users would not be able to select any text inside your scrolling div, is that OK with you?
Yes, no selection at all. Just to keep enabled both gestures and scrolling inside overflowing div.