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
670 stars 96 forks source link

Excel office addin shortcut key doesn't work consistently when using Firefox #3669

Open istiaqahmed opened 1 year ago

istiaqahmed commented 1 year ago

Provide required information needed to triage your issue

Excel office addin shortcut key doesn't work consistently when using Firefox

Your Environment

Expected behavior

Shortcut key should always trigger action (e.g. open/close taskpane). When taskpane is opened, focus should not go away from excel document. Also resetting addin shortcut preference should result in showing conflict prompt when the shortcut has conflict with any excel shortcut.

Current behavior

Steps to reproduce

  1. Open an excel workbook in office web using firefox browser. You can use latest version of firefox.
  2. Add addin manifest. The addin should have one or more shortcuts defined
  3. Press the shortcut key combination. The first time it might work. In case of conflict with any excel shortcut it would also show the conflict prompt and let the user choose which action to trigger (in this case please choose the action of the addin).
  4. Observe that the shortcut, if worked the first time as mentioned in step 3, would work in this session (for example the taskpane would open or close)
  5. Also observe that when the taskpane opens as a result of shortcut, the focus is gone and apparently shortcuts won't work anymore until either taskpane or anywhere in the workbook is clicked.
  6. Now close the workbook and open it again. The addin should show up in the ribbon. And now try using the shortcut.
  7. Observe that addin shortcuts won't work anymore.
  8. If the shortcut had a conflict with any excel shortcut, observe that the excel shortcut would trigger. Even if we reset the addin shortcut preferences using search bar, the conflict prompt would no longer appear.
  9. Now try all these with Chrome or Edge browser and observe that behavior is smooth and consistent at all times. The shortcuts always work, the conflict prompt always shown where applicable, the focus doesn't go away from taskpane.

Link to live example(s)

  1. This sample addin from Microsoft can be used to test the buggy behavior
  2. This stackoverflow issue also contains detailed description about this bug

Provide additional details

  1. This issue was also reported in Firefox support here. They replied that this should rather be reported to Microsoft Office support.


Context

I am working on a excel addin where shortcut keys are used for user convenience. Before submitting for approval, I am testing the addin in all major browsers, and Firefox is acting strangely while Chrome and Edge behaves consistently and equivalently.

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. officewebfirefoxissue

microsoft-github-policy-service[bot] commented 1 year ago

Thank you for letting us know about this issue. We will take a look shortly. Thanks.

Henryz2023 commented 11 months ago

We have been working on a generic issue introduced recently that block the shortcut scenario. The fix was checked in and I hope it will unblock some of your scenarios.

Now we are working on the fix for the Firefox inconsistency issue and will give you update a little later.

Thanks for your patience!