【问题标题】:drag drop feature in iframe chrome 72iframe chrome 72 中的拖放功能
【发布时间】:2019-03-03 06:33:16
【问题描述】:

我有一个 iframe,其中的内容是可拖放的。我在另一个自动生成一个父 iframe 的页面中使用了这个 iframe。拖放功能在除 chrome 72 之外的所有其他浏览器中都可以使用。它在所有其他较低版本中都可以使用。这个自动 iframe 没有来源。当我将自己的 src 放入这个自动生成的 iframe 中时。拖放功能有效。 自动生成的 iframe 是这样的:

<iframe allow="geolocation *; microphone *; camera *" frameborder="no" height="600px" id="0660o000007CIdc" marginheight="0" marginwidth="0" name="0660o000007CIdc" scrolling="no" title="DragDropTest" width="100%"></iframe>

我的内部 iframe 是

<iframe allow="geolocation *; microphone *; camera *" frameborder="0" height="600" id="theIframe" name="theIframe" scrolling="no" src="https://test1.officescope.com/verunasfservicetest/DragDropTest.html" title="Content" width="800"></iframe>

这里有什么问题?

【问题讨论】:

  • 嘿,Babita,只是想知道,您发现问题所在了吗?我目前被这个问题阻止了。我的猜测是:跨域
  • 嗨,Babita Kapoor,您是否找到任何解决方案或任何其他替代方案?

标签: html google-chrome iframe


【解决方案1】:

它是在 Chrome 更新 - 72 中引入的。它已由 Chromium 团队提出。根据 chromium 团队的说法,只有在 iframe 中有 iframe 时才会发生这种情况。

请看这个 - https://bugs.chromium.org/p/chromium/issues/detail?id=936299#c19

解决方法:使用以下命令运行 google chrome - chrome.exe --disable-features=VizHitTestSurfaceLayer,VizHitTestDrawQuad,VizDisplayCompositor

使用上述解决方法尝试下面的 url,您将能够拖放。

 &lt;iframe src="https://dragdropiframedemo.azurewebsites.net/Home.html" width="640" height="480"&gt;

【讨论】:

  • 嗨 Shirin,欢迎来到 stackoverflow!如果您可以在链接中添加一些答案的摘要,那就更好了。否则,这只是评论而不是“答案”。此外,链接可能会过期并变得无关紧要。
猜你喜欢
  • 2017-11-29
  • 2012-05-09
  • 2012-01-18
  • 1970-01-01
  • 1970-01-01
  • 2019-11-19
  • 1970-01-01
  • 2011-11-10
  • 2012-04-14
相关资源
最近更新 更多