문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top