OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
690 stars 95 forks source link

Some properties are empty on Office.context.mailbox.item (Outlook, Multi Select Support, Mac) #4216

Open manuelsidler opened 8 months ago

manuelsidler commented 8 months ago

Your Environment

Expected behavior

When adding SupportsMultiSelect to a taskpane add-in, the taskpane stays open when navigating through mailbox items in read mode. I'd expect Office.context.mailbox.item to reflect the current selected item.

Current behavior

On Outlook for Mac, Office.context.mailbox.item sometimes doesn't have all properties set when navigation through the items in read mode. itemId, conversationId and attachments are empty for instance. This issue doesn't occure all the time and only appear on Outlook for Mac. After closing and opening the taskpane, the properties are set.

Steps to reproduce

  1. Enable multi select support (https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/item-multi-select)
  2. Select an item and open the task pane
  3. Leave the task pane open and navigate through items
  4. Office.context.mailbox.item reflects the current selected item, but sometimes certain properties are missing
DivyaPatidar commented 8 months ago

@manuelsidler could you please provide the reproduction video and the code snippet that you used to obtain these properties?

manuelsidler commented 8 months ago

@DivyaPatidar here's a reproduction video, which shows how I navigate through mail items (without pinning). We refresh our taskpane when a selection has been changed. The code snippet is visible in the developer tools. You can also see that the subject is changing according to the selection. At the end, I close and reopen the add-in. After that the item id has a proper value.

https://github.com/OfficeDev/office-js/assets/802015/e043fa54-3137-4544-b569-4e2c54a759da

DivyaPatidar commented 8 months ago

@manuelsidler Could you clarify if this is a consistent issue or if it occurs sporadically? Does this affect all user accounts? Additionally, would you be able to provide the sample add-in manifest for us to replicate the issue on our side?

manuelsidler commented 8 months ago

@DivyaPatidar in the meantime it's a consistent issue on Outlook for Mac. The add-in is still in development, but all developers can reproduce the issue on their Mac.

I made a sample GitHub repository to reproduce the issue: https://github.com/manuelsidler/outlook-addin-multiselect

Please find attached another two videos, which compare the behavior between Outlook for Mac and Outlook on the web. On the web, it works fine (item id and subject reflects the current selected item). On Mac the subject and the item id don't reflect the current selected item.

https://github.com/OfficeDev/office-js/assets/802015/7bc1952f-394a-457c-8a15-4c0c6f0f71cf

https://github.com/OfficeDev/office-js/assets/802015/425c2194-b2e5-462d-93dc-eb1450003ad2

mmanjaree-msft commented 8 months ago

Thanks for reporting this issue. It is in our backlog but we donot have any timelines to share at this point. Internal tracking id : 8827234

manuelsidler commented 8 months ago

Is there still some information needed from my side?

akagarwa-msft commented 8 months ago

We are good for now; we will investigate from our end and will update.

dmytro-formpipe commented 7 months ago

We also faced with this issue. So might be related. We also have MultiSelect turned on and what we see is that Office.context.mailbox.item does not reflect selected mail, - it remains as it was when Pane was invoked. Basically as on video "item_empty_mac.mp4" when email selection is changed - subject on the Pane does not change/correspond. However call Office.context.mailbox.getSelectedItemsAsync does succeed and return correct mail selection.

Windows Google Chrome Version 123.0.6312.106 (Official Build) (64-bit)

Flyingdot commented 2 months ago

However call Office.context.mailbox.getSelectedItemsAsync does succeed and return correct mail selection.

Unfortunately, it does not contain all the information mailbox.item does - for example categories are missing.