Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Test to show tap and click events #738

wants to merge 2 commits into


None yet
2 participants

Issue '"tap" event bug; triggering click after on anything that is in the coordinate range.'
states in a comment from @madrobby that a test is needed to show what the problem is.

I have created a test to show the following:

  • when a 'tap' event is fired on an element and that element is moved away during the 'tap' event
  • then a 'click' event will be fired on an element that is underneath where the original element was.

Run the test on an Android device/simulator or iOS device/simulator and it will fail. Run it on a desktop browser and it will be fine.

The test requires manual intervention (you have to click the red box) - this is why I have put it into it's own file. The up/down/fire functions that are used by other touch tests do not illustrate this problem.

The reason for the problem is that mobile browser will fire both the tap and click events. The tap gets fired first, with the click fired shortly after.

AncientPaths and others added some commits Apr 4, 2013

@AncientPaths AncientPaths Create touch_manual.html 090ec6e
Matthew Pearson Created touch_manual.html to show how a tap event on mobile browser a…
…lso fires a click event on the element below it, if the tap event moves the tapped element out of the way.

madrobby commented Nov 24, 2013

Related: #553

@madrobby madrobby was assigned Nov 24, 2013


madrobby commented Jul 12, 2016

Closing this because we don’t want to add extra features to the touch or gesture modules. Feel free to fork them and provide them as your own zepto plugin with the extra functionality you need.

Please note that mobile browsers are finally attempting to fix the click vs. tap problem for good, for a discussion on this for mobile Safari please see https://webkit.org/blog/5610/more-responsive-tapping-on-ios/

@madrobby madrobby closed this Jul 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment