Skip to content

Conversation

@wilfrem
Copy link
Contributor

@wilfrem wilfrem commented Mar 16, 2017

Problem

Chrome 56+ treats touchstart/touchmove event as passive default.
So, preventDefault() has no effect at passive event.

https://www.chromestatus.com/feature/5093566007214080

Solve

Test this browser support passive, and set passive: false if support.

// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection
var passive = false;
var options = Object.defineProperty({}, "passive", {
get() { passive = true; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MV corescript shouldn't use ES6 or more!
Can you rewrite this line to ES5?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh...
I fix this.

Copy link
Collaborator

@krmbn0576 krmbn0576 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, LGTM! 😇

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

Successfully merging this pull request may close these issues.

2 participants