I\'m messing around with touch events on a touch slider and I keep getting the following error:
Ignored attempt to cancel a touchmove event with canc
The event must be cancelable. Adding an if statement solves this issue.
cancelable
if
if (e.cancelable) { e.preventDefault(); }
In your code you should put it here:
if (this.isSwipe(swipeThreshold) && e.cancelable) { e.preventDefault(); e.stopPropagation(); swiping = true; }