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

Office.context.mailbox.item.bcc.setAsync causes cursor to move to CC field on Mac Outlook client #4666

Closed jzh-hs closed 1 week ago

jzh-hs commented 4 months ago

Provide required information needed to triage your issue

Your Environment

Expected behavior

After calling Office.context.mailbox.item.bcc.setAsync, the cursor remains where it was previously. This seems to be the behavior on Outlook web.

Current behavior

On Mac desktop, calling Office.context.mailbox.item.bcc.setAsync causes the cursor to move to the CC field. If the CC field was previously hidden/minimized, it becomes visible as well (if the BCC field was hidden, it remains hidden).

I would expect the Mac desktop behavior to match the web behavior and not move the cursor.

Steps to reproduce

  1. Set BCC address programmatically

Link to live example(s)

name: Set BCC (Message compose)
description: Set BCC
host: OUTLOOK
api_set: {}
script:
  content: |
    $("#set-bcc").on("click", setBcc);

    function setBcc() {
      Office.context.mailbox.item.bcc.setAsync(["email@test.com"], function(asyncResult) {
        if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
          console.log("Succeeded in setting Bcc field.");
        } else {
          console.error(asyncResult.error);
        }
      });
    }
  language: typescript
template:
  content: "<section class=\"samples ms-font-m\">\n\t<button id=\"set-bcc\" class=\"ms-Button\">\n    <span class=\"ms-Button-label\">Set \"Bcc\"</span>\n</section>"
  language: html
style:
  content: ''
  language: css
libraries: |
  https://appsforoffice.microsoft.com/lib/1/hosted/office.js
  @types/office-js

  office-ui-fabric-js@1.4.0/dist/css/fabric.min.css
  office-ui-fabric-js@1.4.0/dist/css/fabric.components.min.css

  core-js@2.4.1/client/core.min.js
  @types/core-js

  jquery@3.1.1
  @types/jquery@3.3.1

Provide additional details

Context

Our extension sometimes will set the BCC address in composes. The cursor moving to the CC field disrupts user workflows as they may have been typing in a different field.

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.

rkpathak commented 4 months ago

Thanks for reporting this issue. It has been put on our backlog. We unfortunately have no timelines to share at this point.

Internal tracking id: Office: [9160403]

DivyaPatidar commented 1 week ago

@jzh-hs We have fixed this bug and the fix should be available in build 16.90.24090614 or later. When an updated build is available depends on the release channel a customer is on.