A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
When I close the office.js dialog on Mac, I can do further actions because I get the Office.EventType.DialogEventReceived event.
Current Behavior
When I close the dialog with the x close button of the dialog window or using dialog.close() the DialogEventReceived is not triggered.
Also when I open and close a dialog and when I try to open a dialog again an error is throw which says that a dialog is still active although there is no open dialog.
Steps to Reproduce, or Live Example
Call the openDialog() function
Close the dialog using closeDialog() or just by clicking the dialog close button on top
Observe the "Dialog was closed" text is never written
var dialog;
function openDialog() {
Office.context.ui.displayDialogAsync('https://myDomain/myDialog.html', {height: 30, width: 20},
function (asyncResult) {
dialog = asyncResult.value;
dialog.addEventHandler(Office.EventType.DialogEventReceived, handleDialogEvent);
}
);
}
function closeDialog() {
dialog.close()
}
function handleDialogEvent(arg) {
console.log("Dialog was closed")
}
Context
We react on the close event to know that we can trigger actions like reroute after signout.
We have multiple dialogs but after opening a dialog and closing it the user can't open a second dialog.
Expected Behavior
When I close the office.js dialog on Mac, I can do further actions because I get the Office.EventType.DialogEventReceived event.
Current Behavior
When I close the dialog with the x close button of the dialog window or using dialog.close() the DialogEventReceived is not triggered.
Also when I open and close a dialog and when I try to open a dialog again an error is throw which says that a dialog is still active although there is no open dialog.
Steps to Reproduce, or Live Example
Context
Your Environment