Outlook 365对话框打开时间过长会导致Outlook加载项崩溃

时间:2018-07-31 21:50:07

标签: outlook-addin office-addins

我设置了一个非常简单的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>

我的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
    })
}

部分错误信息如下:

  

t(t){var o = e.call(this,t)|| this;未捕获的异常;返回   o._warnDeprecations({onLayerMounted:“ onLayerDidMount”}),o.props.hostId &&(u [o.props.hostId] ||(u [o.props.hostId] = []),u [o.props.hostId ] .push.componentWillUnmount():   TypeError:无法读取null的属性“扩展”       在Object.o [默认](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。

0 个答案:

没有答案