防止iframe滚动捕获youtube iframe嵌入chrome

Vla*_*col 5 html javascript youtube iframe youtube-api

我有一个标准的youtube嵌入来自随机视频的iframe:

<iframe width="560" height="315" 
src="https://www.youtube.com/embed/ixJ5NbvXg_A" frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen></iframe>
Run Code Online (Sandbox Code Playgroud)

我重复了几次以获得一些滚动溢出.

<html>
<head></head>
<body>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/Mm2eYfj0SgA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe>
</body></html>
Run Code Online (Sandbox Code Playgroud)

当我在localhost上使用django服务器提供此服务时,iframe会阻止页面滚动.

将光标移到视频上然后使用鼠标滚轮滚动时,它不起作用.

真正有趣的是,当我粘贴相同的代码并将其保存到桌面上的本地文件时.然后用chrome打开它,滚动工作在youtube视频上.

我检查了开发人员工具,提供的文件具有完全相同的HTML.有100%没有提供CSS或Javascript,没有模板,没有.在这两种情况下只有一个简单的html文件.

版本71.0.3578.98(官方版)(64位)

Vla*_*col 1

我的具体问题是 Chrome 中的一个错误。如果我重新启动浏览器就可以解决。