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

Outlook: Body html markup missing anchors in ItemSend #2637

Closed milankonir closed 7 months ago

milankonir commented 2 years ago

Message from office-js bot: We’re closing this issue because it has been inactive for a long time. We’re doing this to keep the issues list manageable and useful for everyone. If this issue is still relevant for you, please create a new issue. Thank you for your understanding and continued feedback.

Provide required information needed to triage your issue

Your Environment

Expected behavior

Calling Office.context.mailbox.item.body.getAsync with Office.CoercionType.Html should always return html markup with the anchors that allow consumer to distinguish between parts of the email (current email, signature, reply chain):

Current behavior

Calling the Office.context.mailbox.item.body.getAsync with Office.CoercionType.Html during ItemSend event will return markup without the anchors. Further more, if the ItemSend event cancels the send, the anchors are not available even in the compose experience anymore.

Steps to reproduce

  1. Install ItemSend add-in that prevents item to send
  2. Send Outlook email with signature
  3. When returned back to compose, insert different Outlook signature
  4. Instead of replacing the original signature, second signature is added

Link to live example(s)

Add-in that prevents send during ItemSend: https://github.com/milankonir/onsend-prevent-addin ScriptLab gist: https://gist.github.com/decc736b87c9d44a99b2f8c69ac377e9

Provide additional details

It looks like, the anchors are removed once user hits the Send button. This not only makes them unavailable during ItemSend, but also when returning to compose after ItemSend interrupts send.

Repro video: https://share.getcloudapp.com/nOuXemev

Context

We need to be able to transform / validate the currently composed email part only. It's critical we are able to distinguish that from the signature and the previous reply chain.

Useful logs

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.

exextoc commented 2 years ago

Thanks for reporting this issue regarding the missing anchor tags in ItemSend. It has been put on our backlog. We, unfortunately, have no timelines to share at this point.

Internal tracking id: Eg: Office: 2865284