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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM