记录下touchstart、touchmove、touchend、click的触发顺序
实验环境:mac chromium模拟器,iPhoneX Safari
测试代码
1 | const evts = ["touchstart", "touchmove", "touchend", "click"] |
点击页面
touchstart -> touchend -> click
touchmove事件不触发
在页面滑动
touchstart -> touchmove(可能触发多次) -> touchend
click事件不触发
长按页面(hold)
iPhone: touchstart -> touchend
mac: touchstart (在mac上长按呼出了force touch,没触发touchend。。)
touchmove和click事件不触发