Question

i was wondering the differences bewteen event click and touchstart? What i know currently is that touchstart is more suited for touchscreens, but click works both on touch actions and mouse clicking. I'm kinda of confused to verify those two, and any of these will cause delay in any situtation?

Was it helpful?

Solution

A click is treated like a gesture. It has a delay of around 300ms because the device is waiting to see if the tap is part of a gesture like a double-tap-to-zoom. Touchstart/end has no delay because it is at a lower level than the gestures.

OTHER TIPS

Yes, click will cause a delay of around 200-300ms if memory serves me correctly. Click essentially waits for a touchstart and then touchend.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top