Unable to preventDefault inside passive event listener due to target being treated as passive?

Posted raind

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unable to preventDefault inside passive event listener due to target being treated as passive?相关的知识,希望对你有一定的参考价值。

使用滚动时候,新版google浏览器,会弹出如下的警告。

技术分享图片

解决方法,可以加上* { touch-action: none; } 这句样式去掉。

其原因:https://developers.google.com/web/updates/2017/01/scrolling-intervention(是chrome为了提高页面的滑动流畅度而新折腾出来的一个东西)

分析文章:https://segmentfault.com/a/1190000007913386?_ea=1507605

以上是关于Unable to preventDefault inside passive event listener due to target being treated as passive?的主要内容,如果未能解决你的问题,请参考以下文章

Unable to preventDefault inside passive event listener

错误提示Unable to preventDefault inside passive event listener解决方法

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as

mui执行滑动事件: Unable to preventDefault inside passive event listener

怎么解决unable to preventdefault inside passive event listener due to target

报错: Unable to preventDefault inside passive event listener due to target being treated as passive(示例