Posted by Cameron Dwyer
I’ve been leveraging the Office.js Dialog API recently and found a scenario where I just couldn’t get it to behave properly. At the moment this appears to be either a bug or limitation of the Dialog API. I found that the calling MessageParent() from the dialog fails to trigger the registered callback method in the host add-in when running in IE11 (on both Win 7 and Win 8.1)
Following are the steps to reproduce the issue with the Dialog API under IE11 where the messageParent() method fails to trigger the corresponding event back in the host add-in.
Steps to Reproduce
To reproduce the issue I’ve taken the Dialog API example from dev.office.com and hosted in Azure.
Then I updated the manifest to point to the location where I hosted it, and then tried to use it in the different environments (I made no code changes to the example).
For these repo steps I just opened Word Online in IE11 and side loaded the manifest. The issue also exists using Office Desktop on a machine with IE11 installed (but not Edge) as Office will then be trying to use IE11 and you get a similar issue.
On Windows 10 in Chrome or Edge (works as expected)
On IE11 on WIn 7 & Win 8.1 Fails to Communicate back to Parent Add-in
Now if I use the same manifest and try it from Win 8.1 IE11 the pop up dialog fails to send the message back to the parent add-in when you press a button.
If you close the dialog, the dialog close event method does get triggered back in the parent add-in (this is the same behaviour that we observed when developing our add-in).
I am aware of the documented issue of the Dialog API not working in mixed zones under IE (especially with difference in protected mode between the host page and the add-in/dialog URLs).
In the scenario above the host (Word Online) page is in the Internet Zone with Protected Mode off
And the add-in is also running in the Internet Zone with Protected Mode off