扫码关注官方订阅号
webapp中元素绑定了touchstart和touchend事件,但是touchend不触发问题?iOS上正常,安卓上重现问题,已经确认是浏览器bug,试了几种方案都不能解决。
ps:主要是用来模拟用户按下按钮开始录音,抬起停止录音
光阴似箭催人老,日月如移越少年。
好像是安卓4.X的bug,触发了touchmove,touchend就取消了。当时搜索了下有些解决方案,但是我看不懂,哎。
手头上没有这样的设备,所以自己没有办法测。帮查了下:
试试touchcancel替换touchend
preventDefault()在touchstart和touchmove里面
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
好像是安卓4.X的bug,触发了touchmove,touchend就取消了。当时搜索了下有些解决方案,但是我看不懂,哎。
手头上没有这样的设备,所以自己没有办法测。帮查了下:
试试touchcancel替换touchend
preventDefault()在touchstart和touchmove里面