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
689 stars 95 forks source link

OnMessageAttachmentsChanged event is fired only for the first file when the email is created in a new window (Popup window). #4646

Open guzman-rc opened 4 months ago

guzman-rc commented 4 months ago

When an email is created in a new window (popup window) and several files are attached at the same time, the OnMessageAttachmentsChanged event is only triggered for the first file, subsequently, if you attach several files again, the OnMessageAttachmentsChanged events are triggered correctly, it only fails the first time when several files are attached in a new window.

If the email is not created in a new window the OnMessageAttachmentsChanged event works correctly in all cases.

Your Environment

Expected behavior

Event OnMessageAttachmentsChanged should be triggered for all attachments.

Current behavior

When an email is created in a new window (popup window) and several files are attached at the same time, the OnMessageAttachmentsChanged event is only triggered for the first file,

Steps to reproduce

  1. Install the test Addin from the url: https://www.adarsus.com/addin/outlook_event/manifest_2.xml
  2. Access your email account from Chrome and create a new email and click the button in the upper right corner to open the email in a new window.
  3. Open Chrome's log console and finally attach 2 files.
  4. As you can see in the screenshot, only the xxx event is triggered for the first of the files.

Useful logs

Captura

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

rkpathak commented 4 months ago

@guzman-rc With our test addin, do dont see any difference between first time attachment of multiple files and second time attachment of multiple files. Used both Edge and Chrome to test this. For the addin shared, however for first time with multiple file attachments, I see that only one log of attachment is coming in console. Can you share the Event handler code of your addin to help understand your use of the event? I would be even better if you host the addin to a private repo and share it with @exextoc.

guzman-rc commented 4 months ago

All the code is available from the file: https://www.adarsus.com/addin/outlook_event/commands_2.js

The function called for the OnMessageAttachmentsChanged event is: onMessageAttachmentsChangedHandler

kumarshrey-msft commented 4 months ago

@guzman-rc We are unable to repro this issue, is it possible for you to host the addin to a private repo and share the same with @exextoc ?

guzman-rc commented 4 months ago

What do you need a ZIP file with all the add-on components?

guzman-rc commented 4 months ago

You can download the Addin sources from the url: https://www.adarsus.com/addin/OutlookAddinOnAttach/OutlookAddin_OnAttach_Test.zip

kumarshrey-msft commented 4 months ago

Thanks for reporting this issue, we have been able to reproduce it and it has been put on our backlog. We unfortunately have no timelines to share at this point.

Internal tracking id: Office: [292355]

guzman-rc commented 4 months ago

Now this behaviour occurs in all situations, from a Popup window and without a Popup window.

guzman-rc commented 3 months ago

Hi,

Can you give us an estimate of when this bug might be fixed? We have several customers (thousands of users) waiting to use this functionality (OnMessageAttachmentsChanged).

Best regards, Guzmán.

guzman-rc commented 2 months ago

Hello,

Is there any progress on this issue? It is very important for our company that this issue is resolved as soon as possible.

Best regards, Guzman.

jacges commented 1 month ago

I'm facing the same issue.