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

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





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

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

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

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

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

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





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

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

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

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

相关文章: