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

Outlook SelectedItemDetails with different properties and values between web and desktop #3908

Open manuelsidler opened 11 months ago

manuelsidler commented 11 months ago

Your Environment

Expected behavior

Same properties and values for SelectedItemDetails on web and desktop when calling Office.context.mailbox.getSelectedItemsAsync

Current behavior

When calling Office.context.mailbox.getSelectedItemsAsync, the properties and values of the result are different between Outlook on Mac and Outlook on the web.

Outlook Web:

{
  commandSurface: "read"
  itemId: "..."
  itemType: "message"
  subject: "..."
}

Outlook Mac:

{
  itemMode: "Read"
  itemId: "..."
  itemType: "Message"
  subject: "..."
}

On Mac the mode comes with itemMode in capital letter. On web it's commandSurface in lower letter. The itemType on Mac comes in capital letter. On web it's in lower letter.

The properties and values from Outlook on Mac are consistent with the official documentation (https://learn.microsoft.com/en-us/javascript/api/outlook/office.selecteditemdetails?view=outlook-js-1.13)

Steps to reproduce

  1. Clone the example GH repo to reproduce the issue (see link below)
  2. Run the add-in with npm install and npm run dev-server
  3. Side load the add-in on Outlook for Mac
  4. Select multiple items
  5. Open the add-in
  6. Click the Get selected items button
  7. Side load the add-in on Outlook on the web
  8. Select multiple items
  9. Open the add-in
  10. Click the Get selected items button
  11. Compare the output in the text area between both platforms

Link to live example(s)

exextoc commented 11 months ago

Thanks for reporting this issue regarding getSelectedItemsAsync API. This has been put in our backlog. We, unfortunately, have no timeline to share at this point.

Internal Tracking ID: 4169296