Office-js: After create new dialog, it contains event handlers from previous dialog which was closed by dialog.close() call on Mac for outlook

Created on 12 Nov 2018  路  19Comments  路  Source: OfficeDev/office-js

If we creates new dialog window with event handler for it and then close it (call dialog.close()), second created dialog window will contains event handlers from previous dialog. The bug reproduces only in outlook client, mac os.

Expected Behavior

  1. Call Office.context.ui.displayDialogAsync for create new dialog window and set event handler function for this dialog window.
  2. On the dialog window call Office.context.ui.messageParent function and send message.
  3. Parent window handles message and close dialog, calls dialog.close().
  4. Open new dialog again, call Office.context.ui.displayDialogAsync and set event handler function for this dialog window.
  5. On the dialog window call Office.context.ui.messageParent function
  6. Parent window will handle this message ONCE.

Current Behavior

  1. Call Office.context.ui.displayDialogAsync for create new dialog window and set event handler function for this dialog window.
  2. On the dialog window call Office.context.ui.messageParent function and send message.
  3. Parent window handles message and close dialog, calls dialog.close().
  4. Open new dialog again, call Office.context.ui.displayDialogAsync and set event handler function for this dialog window.
  5. On the dialog window call Office.context.ui.messageParent function
  6. Parent window will handle this message TWICE.
    Dialog contains more than one event handlers.

Steps to Reproduce, or Live Example

I created small outlook plugin for demonstrate this bug. Plugin called 'dialogBug'. dialogBug link to github

  • Additional details:
    Video which demonstrates this bug via my 'dialogBug' plugin.

Context

This bug restricts people who use office.js library. Developers can not handle messages from dialog correctly in mac os. As temporary solution, I just create global variable (var mutex) and use it for avoid race condition in my code.
I'm working with outlook plugin for our corporative application. And this bug makes problem for my code.

Your Environment

  • Platform Mac
  • Host Outlook client
  • Outlook version number: 16.18 (181014)
  • Operating System: Mac
Outlook fixed product bug

Most helpful comment

@macOutlookExtensibility are you able to provide an update on this issue?

All 19 comments

clickEvent.completed();

Hi, hengchengfei. What is it? What do you mean? I can not find any mentioning about it in documentation.

1

No, @hengchengfei , in our case we don't use 'ExtensionPoint' for open dialog window. We don't have instance of event. We just transfer event handler function in Office.context.ui.displayDialogAsync call. And make this call not from 'OfficeTab' panel, we do it from index.html page. (There is our manifest file https://github.com/alexnb11/office-js-dialog-handler-bug-mac-os/blob/master/manifest.xml#L113)

Thanks for reporting this issue, @alexnb11. @macOutlookExtensibility, can you take a look?

@dmahugh Thank you for supporting. I'm waiting a resolution, it is important for my work.

@macOutlookExtensibility are you able to provide an update on this issue?

I'm having the exact same issue using the dialog in Word.

@kbrandl @macOutlookExtensibility Any updates about this bug???

@kbrandl Any updates?

@alexnb11 apologies for the delay on this -- @macOutlookExtensibility is the one who'll need to investigate and provide feedback on this (as it's not my area of expertise.)

@macOutlookExtensibility can you please provide an update on this issue?

@kbrandl @macOutlookExtensibility Can we use additional resources for fix this problem? It is continuing more then 1 year. It looks strange for me, employees of Microsoft can not fix official bug for 1 year.

Sorry for the delay in response. We are not able to reproduce the bug. The add-in provided seems to have stopped working. Please let us know if the issue is still persistent.

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

@exextoc Hi, I checker, it is still persistent.

@exextoc you can see this bug on macbook only.

@alexnb11 Apologies for delay in response. We tested this again on our end with Outlook Mac (version: 16.41 (20081001), we are not able to reproduce this issue. We used your addin from GitHub for this testing.

Thanks for uploading repro addin on GitHub for this purpose.

Are you testing with latest version of Outlook? What version you are using?

@exextoc I just have checked it again. It works well. So looks like it was fixed. I think we can close this bug. Thank you.

Thanks @alexnb11 for confirming. Closing this issue.

Was this page helpful?
0 / 5 - 0 ratings