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

Chrome treats document-level touch event listeners as passive by default #42

Open
lifenstein opened this issue May 19, 2017 · 4 comments

Comments

@lifenstein
Copy link

The plugin isn't working properly for me in Chrome version 58.0.3029.83 on Android on the demo page at http://stephen.band/jquery.event.move/ . Instead of just the red block moving, the page moves as well.

On the desktop, I can see this warning in Chrome cersion 58.0.3029.110 (64-bit) when using Chrome DevTools console to simulate mobile view:

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080

The behaviour was added to Chrome in version 56, which came out on 25th January.

@usernamethatsnottaken
Copy link

Did you find a workaround? I'm having the same issue.

@MarkNewcomb1
Copy link

Same issue here.

@lifenstein
Copy link
Author

@usernamethatsnottaken No, I didn't find a workaround...

@DanielLavrushin
Copy link

workaround would be listening the events with passive = false.

adding it to line 121 fixed the issue for me

node.addEventListener(type, handler, { passive: false });

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

4 participants