Outlook 365对话框打开太长时间崩溃前景插件

mat*_*iel 6 office-addins outlook-addin

我已经设置了一个非常简单的functions.html,它启动了一个同样简单的对话框,只注册Office.initialize和控制台日志.如果打开时间太长,我在控制台中会出现一个大错误,除了刷新外,对话框变得不可用.

这是一个已知问题还是我需要采取不同的做法?

dialog.html

<!DOCTYPE html>
<html lang="en" style="height: 100%">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="theme-color" content="#000000">

    <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
    <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">

    <script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
    <title>React App</title>
    <script>
        Office.initialize = x => {
            console.log('initialized')
        }
    </script>
  </head>
  <body style="height: 100%">
  yo stuff
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

我的js看起来像这样

export const showSmsModal = () => {
    officeCtx().ui.displayDialogAsync(`${window.location.origin}/test.html`, {displayInIframe: true, height: 40, width: 40}, ({ value: dialog }) => {
        console.log(dialog)
        return dialog
    })
}
Run Code Online (Sandbox Code Playgroud)

我得到的部分错误如下:

t(t)中未捕获的异常{var o = e.call(this,t)|| this; return o._warnDeprecations({onLayerMounted:"onLayerDidMount"}),o.props.hostId &&(u [o.props.hostId ] ||(u [o.props.hostId] = []),u [o.props.hostId] .push.componentWillUnmount():TypeError:无法在Object.o中读取null的属性'extension'[默认] (https://r4.res.office365.com/owa/prem/16.2478.1.2588899/scripts/owa.clientnext.extensibility.js:2:16883)在e.refCallback(https://r4.res.office365. com/owa/prem/16.2478.1.2588899/scripts/owa.clientnext.extensibility.js:7:15203 )r(https://r4.res.office365.com/owa/prem/16.2478.1.2588899/scripts/owa .clientnext.application.js:94:3330)在Object.a.detachRefs(https://r4.res.office365.com/owa/prem/16.2478.1.2588899/scripts/owa.clientnext.application.js:94: 3783)

看来用于调用showDialog函数的隐藏iframe消失了,对话框iframe无法与它通信,我设置的间隔控制台日志似乎停止了.

我希望它关闭两个iframe.