madrobby/zepto — pull request #738 by AncientPaths (2013-04-04 12:34:36+00:00)
Title: Test to show tap and click events

Issue '"tap" event bug; triggering click after on anything that is in the coordinate range.'
https://github.com/madrobby/zepto/issues/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.