当按下对话框的关闭按钮(x)(显示在iframe中)时,显示的iframe将被删除,但包括关闭按钮和标题的面板仍然保留。我在日志中发现了以下错误,但我不确定TypeError: o.get_contextActivationManager is not a function
中是否发生了相关owa.clientnext.extensibility.js:7:1898
。
Exchange服务器版本为 15.1(Build 1034.26)。 Probelm发生在
我使用以下函数来创建对话框:
export async function GetFiles(): Promise<string[]> {
return new Promise<string[]>((resolve, reject) => {
Office.context.ui.displayDialogAsync(window.location.origin +
'/exchangeAddIn/UploadDialog/index.html',
{
height: 50,
width: 50,
displayInIframe: true
},
(asyncResult: Office.AsyncResult) => {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
Logger.error('Faild Dialog %o', asyncResult);
reject();
}
else {
let dialogHandler = asyncResult.value as Office.DialogHandler;
dialogHandler.addEventHandler(
Office.EventType.DialogMessageReceived, (args: any) => {
dialogHandler.close();
if (args.message == null) {
resolve();
}
let array = JSON.parse(args.message) as string[];
resolve(array);
});
dialogHandler.addEventHandler(
Office.EventType.DialogEventReceived, (arg: any) => {
reject();
});
}
});
});
}