Adobe Edge Firefox iframe 错误

Adobe Edge Firefox iframe error

我有一个使用 Adob​​e Edge 6 的动画。 我正在尝试将动画包含在 iframe 中。该代码在 ChromeIE 10 上运行良好。但是在 Firefox 上,我在 Adob​​e Edge 库 TypeError: C.getComputedStyle(...) is null -> edge.6.0.0.min.js Line-77 上遇到 javascript 错误。

如果我在 Firefox 43 上打开动画页面,它运行良好,只有在 iframe 中包含动画时才会出现错误。

动画页面:

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <title>Untitled</title>
    <!--Adobe Edge Runtime-->
    <script type="text/javascript" charset="utf-8" src="/Scripts/edge.6.0.0.min.js"></script>
    <style>
        .edgeLoad-EDGE-1689000111 {
            visibility: hidden;
        }

        div {
            position: absolute !important;
        }
    </style>
    <script>
        AdobeEdge.loadComposition('Test', 'EDGE-1689000111', {
            scaleToFit: "both",
            centerStage: "none",
            minW: "0",
            maxW: "undefined",
            width: "870px",
            height: "350px"
        }, { dom: [] }, { dom: [] });
    </script>
    <!--Adobe Edge Runtime End-->
</head>
<body style="margin:0;padding:0">
    <div id=" stage" class="EDGE-1689000111">
    </div>
</body>
</html>

iframe使用动画页面:

<iframe class="embed-responsive-item" frameborder="0" src="PATH"></iframe>

几天前我遇到了同样的问题。 可能的原因之一是 iframe(或其父节点之一)上的 "display:none" 规则。即使稍后将 "display" 规则设置为 "block",这也可能导致错误。

这是 bugzilla 上的相关问题: https://bugzilla.mozilla.org/show_bug.cgi?id=548397

您能否检查 iframe(或其父级)在首次出现在 DOM 时是否具有 "display:none"?

现在我们要设置 "opacity:0" 或 "visibility:hidden" 而不是 "display:none"。