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

Posted 皓贤

tags:

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

处理h5 在新版本的Chrome和safari中的拖动问题  iphone 微信,谷歌说明地址:https://developers.google.com/web/updates/2017/01/scrolling-intervention

为了不修改过多代码,针对已经上线的业务,采用如下方式解决:

document.addEventListener(‘touchmove‘, function(event) {
event.preventDefault();
}, { passive: false } );

以上是关于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(示例