voronianski / swipe-js-iso

Universal (a.k.a isomorphic) version of Swipe.js
https://www.npmjs.com/package/swipe-js-iso
MIT License
187 stars 57 forks source link

Error: [Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted. #30

Open ch4r1y opened 5 years ago

ch4r1y commented 5 years ago

It happens when you are doing scrolling and you try to move one slide at a time.

image

I think the fix can be add "event.cancelable":

` // if user is not trying to scroll vertically if (event.cancelable && !isScrolling) { // prevent native scrolling event.preventDefault();

      // stop slideshow
      stop();

      // increase resistance if first or last slide
      if (continuous) {

`

miksansegundo commented 4 years ago

This issue crashes Safari UIWebView, the fix is:

if (event.cancelable) event.preventDefault();

Consider merging the PR https://github.com/voronianski/swipe-js-iso/pull/36, please.