Joe*_*e50 3 javascript android touch touchmove
当我尝试touchmove在这个jsbin演示中检查事件时,它只在Chrome和Opera for Android中触发一次,之后立即触发touchcancel事件,而不是继续触发touchmove事件?
基于W3C规范以及touchmoveFirefox for Android和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.
Run Code Online (Sandbox Code Playgroud)
这是我第一次点击屏幕(通过touchstart和显示touchend),然后拖动屏幕(touchstart,touchmove和touchcancel)时发生的情况.按照上面提到的相同规范,touchcancel事件应该仅在某些事情发生干扰时运行,例如浏览器界面(如果我理解正确的话).
由于我只是简单地将手指滑过身体而没有离开窗户,我对此感到非常困惑,所以有人知道为什么会这样吗?
我在Chrome 32和Opera 19 for Android中获得了这个意想不到的结果.
| 归档时间: |
|
| 查看次数: |
4463 次 |
| 最近记录: |