简体   繁体   English

Skrollr导致干预错误并更改body和html的element.style使其溢出:隐藏

[英]Skrollr causing intervention error and changing element.style of body and html to overflow: hidden

I'm trying to use skrollr on my website, but when I include needed files and write script tags at the end of my html file console write this error everytime when you try to scroll: skrollr.min.js:2 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 我试图在我的网站上使用skrollr,但是当我在HTML文件控制台的末尾包含所需文件并编写脚本标签时,每次尝试滚动时都写此错误: skrollr.min.js:2 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 skrollr.min.js:2 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 and it changes element.style of body and html to overflow: hidden and it is impossible to scroll on that website. skrollr.min.js:2 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 ,它将body和html的element.style更改为overflow: hidden ,并且无法在该网站上滚动。 Can you help me how to prevent that ? 您能帮我如何预防吗? Everything works fine when you just remove skrollr.js from that file. 当您从该文件中删除skrollr.js时,一切正常。

Add an override to your main css file: 向您的主CSS文件添加替代:

body, html {
  overflow: visible !important;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM