Open Faye0807 opened 5 years ago
2、click延迟与touch事件的关联
当点击移动设备屏时触发事件:touchstart - touchmove - touchend - click
当在touchend事件结束后会有300ms时间延迟来判断是否会有第二次点击(即是否会双击);所以click事件会在touhend事件300ms后触发
另外:click事件触发的前提是
touchstart - touchend
事件都触发 touchend 的事件处理程序内阻止事件的默认行为,就不会触发click事件
1、- 参考-移动端touch事件影响click事件以及在touchmove添加preventDefault导致页面无法滚动的解决方法