当我尝试检查touchmove
事件在这个 jsbin 演示它只在 Chrome 和 Opera for Android 中触发一次,之后立即触发touchcancel
事件,而不是继续触发touchmove
events?
基于两者W3C 规范,以及行为touchmove
在 Android 的 Firefox 和 Android 的默认浏览器中,触摸事件的工作方式似乎是touchmove
当触摸仍在页面上时,事件不断触发。后尝试在这个 jsbin 中进行测试不过,我收到以下日志消息:
touchstart event; starting on (140,197) on the screen, or (381,536) on the page.
touchend event; starting on (undefined,undefined) on the screen, or (undefined,undefined) on the page.
touchstart event; starting on (181,137) on the screen, or (492,372) on the page.
touchmove event; starting on (182,153) on the screen, or (495,416) on the page.
touchcancel event; starting on (undefined,undefined) on the screen, or (undefined,undefined) on the page.
这就是我第一次点击屏幕时发生的情况(通过touchstart
and touchend
),然后拖动屏幕(touchstart
, touchmove
and touchcancel
)。走过同样的路specs上面提到,touchcancel事件应该only当有东西干扰时运行,例如浏览器界面(如果我理解正确的话)。
由于我只是将手指滑过身体,根本没有离开窗户,我对此感到非常困惑,所以有人知道为什么会发生这种情况吗?
我得到了这个意想不到的结果铬32 and Opera 19对于安卓。