扫码关注官方订阅号
在写页面的过程中发现,在move事件中写了return false在手机上无效,只能通过preventDefault, 这是bug么?
业精于勤,荒于嬉;行成于思,毁于随。
是的,这是 Android 的一个 bug,存在于 4.0 和 4.4 版本的默认浏览器中。详见:https://code.google.com/p/android/issues/detail?id=19827
你可以试试 mobiletouch 这个库,它在触屏事件上层做了封装,你可以用 swipeStart ,swipeProgress 和 swipe 来替代 touchstart, touchmove 和 touchend.
mobiletouch
swipeStart
swipeProgress
swipe
touchstart
touchmove
touchend
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
是的,这是 Android 的一个 bug,存在于 4.0 和 4.4 版本的默认浏览器中。详见:https://code.google.com/p/android/issues/detail?id=19827
你可以试试
mobiletouch
这个库,它在触屏事件上层做了封装,你可以用swipeStart
,swipeProgress
和swipe
来替代touchstart
,touchmove
和touchend
.