Open clopez opened 9 years ago
@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.
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/