I have an add-in command that opens a dialog through the Dialog API
When I click on the command button, the dialog opens and a "loading" spinner appears. In Outlook 2016, the spinner then freezes and the page does not appear. When you resize the dialog by dragging the edges, the requested page suddenly appears. Sometimes the page loads normally.
This is happening on Outlook 2016 32-bit version 16.0.8326.2096, but was also happening on earlier versions of Outlook 2016. Works fine on Outlook 2013 SP1 and Outlook Web.
Monitor setup: Macbook Pro Retina (2880x1800) + 2x Asus PB278 27" (2560x1440), running Boot Camp/Windows 8.1. Pro. Also happens without having the monitors connected and on other configurations.
FunctionFile JS:
var envUrl = window.location.host;
var fullUrl = 'https://' + envUrl + '/';
var _event;
(function () {
Office.initialize = function() {};
})();
function openDialog(e) {
_event = e;
Office.context.ui.displayDialogAsync(fullUrl + 'Pages/Dialog.html',
{ height: 50, width: 50, displayInIframe: true },
function (asyncResult) {
var dialog = asyncResult.value;
dialog.addEventHandler(Office.EventType.DialogEventReceived,
processDialogEvent);
});
}
function processDialogEvent() {
_event.completed();
}
Dialog.html:
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>