使用 swiper.js jquerymobile.js 等移动端js库的时候,如果使用了滑动事件,不时会看到报错:“
Unable to preventDefault inside passive event listener due to target being treated as passive”。但奇怪的是脚本运行正常,
解决方法
css中加上这句* { touch-action: none; }一般就可以了
使用 swiper.js jquerymobile.js 等移动端js库的时候,如果使用了滑动事件,不时会看到报错:“
Unable to preventDefault inside passive event listener due to target being treated as passive”。但奇怪的是脚本运行正常,
解决方法
css中加上这句* { touch-action: none; }一般就可以了
3万+