Execution of the Click event on the mobile side usually has a delay of 300 milliseconds, and to prevent this unwanted delay, we can do it in a different way, as well as the effect of the click event quickly.
Let's look at the execution order of the mobile click: Touchstart-> Touchmove, Touchend, MouseOver->mousemove->click, as you can see from this execution order, walk through this Process, 300 milliseconds to the click Response is not surprising.
In this case, we can completely replace the Click event with Touchstart, and in the Click event, the type of event can be used to quickly execute the response.
iOS blocks the default click event principle, which requires the main:
(1) only for iOS, other platforms do not have to block;
(2) When touchend to see the movement of the finger to feel that the click or cancel the touch event;
(3) It is necessary to block only if the event type is click.
Compare time and position with Touchstart when Touchend, to distinguish whether "pressed" operation is performed. It is worth mentioning that the tap event of Zepto has been a good solution to this problem for us.
About the Click event on the mobile side