Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Emitted error) Ignored attempt to cancel a touchstart event with cancelable=false, for example because scrolling is in progress and cannot be interrupted. #220

Open
Rezyan opened this issue Mar 23, 2022 · 1 comment

Comments

@Rezyan
Copy link

Rezyan commented Mar 23, 2022

Hi,

When using draggabilly with a mobile device (e.g. with the Chrome DevTools), an error is sometimes emitted in the console, but I have some trouble reproducing it without my app, so i can't show you the steps:

[Intervention] Ignored attempt to cancel a touchstart event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
proto.handlePointerDown @ draggabilly.js:189
proto.emitEvent @ ev-emitter.js:86
proto.emitEvent @ draggabilly.js:120
proto.pointerDown @ unidragger.js:153
proto.ontouchstart @ unidragger.js:120
proto.handleEvent @ unidragger.js:36

3

2

A quick fix could be something like this:

event.preventDefault();

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

Regards

@Rezyan
Copy link
Author

Rezyan commented Nov 16, 2022

Hey @desandro, could you please take a look at this issue and the related PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant