OfficeDev / office-js-helpers

[ARCHIVED] A collection of helpers to simplify development of Office Add-ins & Microsoft Teams Tabs
MIT License
126 stars 56 forks source link

messageParent not closing dialog in IE 11 #85

Open wilsonyqm opened 6 years ago

wilsonyqm commented 6 years ago

we are implementing Excel Addin on all platforms, the dialog won't close on IE 11 only. The code goes to this line https://github.com/OfficeDev/office-js-helpers/blob/73e0df2dc392468a2576b94c9ebe94e52d62dcfe/src/helpers/dialog.ts#L189 Somehow it never called the result function on this line https://github.com/OfficeDev/office-js-helpers/blob/2e493dbba818aaaee10518e587c6fa86bcaf0bae/src/helpers/dialog.ts#L69 so the dialog isn't closed.

we are using OfficeHelpers.Authenticator().authenticate(provider) to open the dialog, it didn't receive a result on this line https://github.com/OfficeDev/office-js-helpers/blob/a4e46bf3bc5e79b58da51c8d20749170a4d2d1d1/src/authentication/authenticator.ts#L151 wechatimg1

It was working before, it seems like the update on IE 11 recently on April 10th could break it.

Let me know if you guys have the same issue or need more info.

WrathOfZombies commented 6 years ago

Let me take a look at it and get back to you.

blandine commented 6 years ago

As a side note, I solved a similar issue ( Office.context is not defined in the dialog because Office.initialize hasn't been called after the redirection) when running the addin on localhost with IE11. I removed the IE intranet specific behaviour on IE options: https://i.stack.imgur.com/kL8T8.png I've followed this SO answer : https://stackoverflow.com/questions/48402730/office-js-displaydialogasync-not-working-correctly-in-word-online-on-ie

bravew commented 5 years ago

I have a workaround by removing placeholder AppDomain1(2,3) tags in the manifest.xml file.