ractivejs / ractive-events-tap

Tap/fastclick event plugin for Ractive.js
http://ractivejs.github.io/ractive-events-tap/
MIT License
9 stars 18 forks source link

Taps get triggered twice on Windows Phone (Internet Explorer mobile) #8

Open Vinze opened 10 years ago

Vinze commented 10 years ago

Maybe related to: https://github.com/ractivejs/ractive-events-tap/issues/1 ?

Ghazgkull commented 8 years ago

I'm observing the same problem.

Ghazgkull commented 8 years ago

The events that are firing out of the plugin are a PointerEvent followed by a TouchEvent.

Still working my way through the code, but on initial inspection, it looks like the mouse, pointer, and click event handling is all grouped together such that they cancel each other out to prevent multiple firings. But the touch events are in a separate function/closure... could the problem be that when a pointer event is fired it doesn't cancel the touch events?

Ghazgkull commented 8 years ago

For now I've just worked around the problem by hacking the bind function so that it doesn't bind the pointerdown or MSPointerDown events if touch support is available (checking for "ontouchstart" in window).

dwolner commented 8 years ago

Also seeing this behavior. As per your suggestion @Ghazgkull , I added a conditional to only register ontouch events OR pointerEvents. This is working for me, will add as pull request.

janinel commented 8 years ago

I am also seeing this behaviour - would appreciate a fix as soon as possible.

dwolner commented 8 years ago

i just proposed a pull request #18 . working for me on iOS, Android, Windows 10