JedWatson / react-tappable

Tappable component for React
http://jedwatson.github.io/react-tappable/
MIT License
862 stars 90 forks source link

Mouse events are not effectively blocked #1

Closed JedWatson closed 9 years ago

JedWatson commented 9 years ago

The Tappable component blocks the immediate mouse events that follow the touch events to prevent firing the onTap action twice while still supporting both touch and mouse input types.

However, if the onTap event fires a UI change that immediately places a different tappable component in the place of the original, the mouse events are not correctly blocked on the second tappable causing two onTap events to fire from a single touch.

The blocking method needs to be global to the page to prevent this behaviour.