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

Check for mouse events also on touch devices #295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clopez
Copy link

@clopez clopez commented Dec 16, 2014

Even if a device has touch capabilities (most modern laptops have) the user can still be using the device with a mouse. So install the mouse handler events also for touch-capable devices.

More info: https://hacks.mozilla.org/2013/04/detecting-touch-its-the-why-not-the-how/

@cesutherland
Copy link
Member

@clopez thanks for the reference! This relates to #271 and several other issues.

The issue is, for all touch devices, having both sets of event handlers will trigger the handlers multiple times (per single event). The reference you suggest mentions e.preventDefault to stop propagation of the synthetic click events. Do you know if this actually works? And if it also works for the mouse events?

I don't have a touch + mouse device, but it might be possible for me to debug this myself using chrome's simulated touch events.

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