I have a div
with IScroll inside another div
with IScroll. Whenever I try to make scroll on the child div
, the parent scrolls too, so it's an awful user experience.
I would like not to get every variable and telling it to disable it temporally, such as in this other question, because they are dynamic content and the scrollers are created inside a class - so there are not global variables storing the scroller.
I have visited this question but whenever I try to catch the event
, it's undefined
so it raises an error. It seems that IScroll 5 does not send the event to the handlers, so I cannot write event.stopPropagation()
, because it does nothing.
I've tried with all the events IScroll provides, and even I have tried to switch back to iScroll 4 and trying onBeforeScrollStart
and so on, also without luck.
The solution should be able to work on touch enabled devices, but also with mouse interaction (drag) and mousewheel.
Is it possible? If so, what can I do so the parent scroller stops from scrolling if it's the child who is getting the scroll action?
Thank you.