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

OWA Issue: Office.context.mailbox.item.setSelectedDataAsync will replace the next character if the body CoercionType is Text #3905

Open nmetnikUMT opened 11 months ago

nmetnikUMT commented 11 months ago

Provide required information needed to triage your issue

When I make the following call: Office.context.mailbox.item.setSelectedDataAsync , it will add/replace with what I tell it too, but it will also replace the next character but if the body CoercionType is Text. This only happens on the web/OWA, not on the desktop version of O365.

Your Environment

Expected behavior

Expected it to not delete the next character after the selection.

Current behavior

Example if I wanted to add Hello World, change the body coerciontype to text then call setSelectedDataAsync: Going to insert Hello World on this line

Results in: Hello World oing to insert Hello World on this line

Steps to reproduce

  1. Open O365 online
  2. Set the cursor anywhere in the message body.
  3. Call Office.context.mailbox.item.setSelectedDataAsync via javascript

Context

Development breaking. Unable to make client happy/meet expectations.

nmetnikUMT commented 11 months ago

Update: If I change the desktop client to the "New Outlook", the same bad behavior happens as OWA version.

exextoc commented 11 months ago

Thanks for reporting this issue regarding setSelectedDataAsync with plain text format. It has been put on our backlog. We unfortunately have no timelines to share at this point

Internal tracking id: Office: 4168150