How to give swiping precedence over scrolling on mobile?

Terry Judd terry.judd at
Wed Dec 19 19:58:15 EST 2018

This is a problem that I have run into before and have never been able to solve satisfactorily. I’m using touchStart and touchEnd handlers to detect the direction and speed of a finger movement and if it is within certain bounds (large enough x, small enough y, and fast enough) then the user can swipe back and forwards through a series of cards. Good so far except when the area they are swiping on also includes a mobile scroller (to scroll a list selection widget/thingy). In that situation the swiping becomes a bit of a hit and miss thing – works sometimes but not others. On iOS there are a few scroller parameters look potentially useful (canCancelTouches, delayTouches, and lockDirection) but it’s not really clear (to me at least) which of these might help and if so whether I should be setting them to true or false.

Any ideas?


More information about the Use-livecode mailing list