Slick: Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

Created on 8 Oct 2015  Â·  6Comments  Â·  Source: kenwheeler/slick

Hi!

I've been testing my web app with those google chrome iphone ipad and etc simulators and faced the issue of JQuery warning messages "Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted". When you scroll the slider horizontally it prevents the vertical touch scroll and the issue doesn't appear. When you touch-scroll slider vertically (with the whole page) and then move left or right in the same motion you can see those messages in the log.
The root cause is this line that tries to prevent the default event (its line 2370 from 1.5.7 version of slick.js)

if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
event.preventDefault();
}

By commenting it out the issue doen't reproduce.

Thx.

Most helpful comment

Hello. Add event.cancelable to your logic. Try this:

if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4 && event.cancelable) { event.preventDefault(); }

All 6 comments

Hey I'm gonna close this because there's no fiddle. Here's a fiddle for you to fork if you'd like to pursue it further. Thanks @ivolnov.

if horizontally scroll write this overflow-scroll="false" , vertically overflow-scroll="true"
this is work for me...

Hello. Add event.cancelable to your logic. Try this:

if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4 && event.cancelable) { event.preventDefault(); }

@ravo10 where do we put
if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4 && event.cancelable) { event.preventDefault(); }

You need to put it at the very top before any other code is executed, so that you are sure that event.preventDefault() is fired before it is to late. fredag, 22 juni 2018, 01:53p.m. +02:00 from saimali9 [email protected] :

@ravo10 where do we put
if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4 && event.cancelable) { event.preventDefault(); }
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub , or mute the thread .

if horizontally scroll write this overflow-scroll="false" , vertically overflow-scroll="true"
this is work for me...

Where do you put this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hoghamburg picture hoghamburg  Â·  3Comments

k-lusine picture k-lusine  Â·  3Comments

msavov picture msavov  Â·  3Comments

rahi-rajeev picture rahi-rajeev  Â·  3Comments

xtatanx picture xtatanx  Â·  3Comments