title: Can someone confirm the following bug in Office.js on macOS (Microsoft Word)?
body: <p>The following very simple code works fine on Word Online and Word 2016 on Windows 10.</p>
  
  <p>It works the first time it is used on macOS and Word 2016, but then throws an error on any <strong>subsequent</strong> use...until the page is refreshed and then it works again.
  To reproduce:</p>
  
  <ol>
  <li>Open a dialog window using the dialogAPI</li>
  <li>Click to close the new window</li>
  <li>Click on the button that triggers the opening of the dialog window</li>
  </ol>
  
  <p>On the second attempt no window opens on Mac.</p>
  
  <p>I am on Office Insider Slow running Word for Mac Version 116.13.1 (180523). I have had this issue since a previous release of Office Insider Slow.</p>
  
  <p>The error thrown is:</p>
  
  <blockquote>
    <p>TypeError: undefined is not an object (evaluating 'dialog.addEventHandler')</p>
  </blockquote>
  
  <p>It seems that, on a Mac, the dialog object is not closed when the dialog window is closed.</p>
  
  <p>Code:</p>
  
  <pre><code>dialogUrl = dialogUrl + 'qLTI.html';
  
  Office.context.ui.displayDialogAsync(dialogUrl, {height: 90, width: 70},
    function (asyncResult) {
      dialog = asyncResult.value;
        dialog.addEventHandler(Office.EventType.DialogMessageReceived, processMessage);
    }
  );
  </code></pre>
  
  <p>Trying to get confirmation and also flag MSFT. Thank you.</p>