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

Test to show tap and click events #738

Closed
wants to merge 2 commits into from

Conversation

AncientPaths
Copy link

Issue '"tap" event bug; triggering click after on anything that is in the coordinate range.'
#511
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 2 commits April 4, 2013 14:13
…lso fires a click event on the element below it, if the tap event moves the tapped element out of the way.
@madrobby
Copy link
Owner

Related: #553

@ghost ghost assigned madrobby Nov 24, 2013
@madrobby
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants