Search code examples
office-jsoutlook-web-addins

Outlook 2016 Add-in Dialog hangs on "Loading"


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>

Solution

  • Thank you for your patience. We have fixed the bug and the fix should be available in build <16.0.8619.1000> or later. Depending on the release channel a customer is on, the getting an updated build can take anywhere from 4-8 weeks.