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

click event in a draggable not fired in chrome on mobile #517

Closed
jackychow opened this issue Jun 2, 2017 · 0 comments
Closed

click event in a draggable not fired in chrome on mobile #517

jackychow opened this issue Jun 2, 2017 · 0 comments

Comments

@jackychow
Copy link

I believe this has something to do with chrome 56 modification on preventDefault but am not sure because I am not super familiar with interactjs's codebase and the preventDefault mechanism.

What I having trouble with is my buttons inside my draggable cannot capture the click event. This happens with Chrome on a mobile device.
Chrome on desktop, Safari on iOS works.
When using chrome's mobile device emulation I got the warning:
"Unable to preventDefault inside passive event listener due to target being treated as passive"

As I read on a previous issue post:
#58

It seems that in order for click events to work inside a draggable, the preventDefault method has to be called and the new chrome changes breaks the preventDefault method and is this why clicking does not work on a touch device?

Any suggestion would be appreciated!

taye added a commit that referenced this issue Jun 25, 2017
If the browser supports the {add,remove}EventListener options object
parameter, CSS touch-action and user-select can be used instead to
prevent scrolling and text selection.

With this change, clicks from touch events are no longer prevented on
Browsers that support the options parameter:
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Browser_compatibility

Close #512, #517
Related to #58
@taye taye closed this as completed Nov 30, 2017
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

2 participants