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

Excel add-in with two taskpane windows opens wrong page #4737

Open jim22k opened 1 month ago

jim22k commented 1 month ago

Provide required information needed to triage your issue

Your Environment

Expected behavior

The AnacondaToolbox add-in has two ribbon buttons on the Formulas tab.

Current behavior

Depending on the order in which the taskpane windows are closed, re-opening them causes the wrong page to open. i.e. The manifest declares that "Toolbox" should open https://xltb.anaconda.cloud/, but sometimes clicking "Toolbox" opens https://xltb.anaconda.cloud/pyscript/, which is the URL associated with "Code" and is also the default source location and the long runtime URL. It seems that "Toolbox" sometimes opens a URL which it is not associated with.

Steps to reproduce

  1. Install AnacondaToolbox from AppSource
  2. Click on Code icon in the ribbon and observe that the top of the taskpane says "Anaconda Code"
  3. Click on Toolbox icon in the ribbon and observe that the top of the taskpane says "Anaconda Toolbox"
  4. Close the Toolbox window
  5. Close the Code window
  6. Click on Toolbox icon in the ribbon and observe that the top of the taskpane says "Anaconda Code" -- i.e. it opened the wrong taskpane window
  7. Click on Toolbox icon in the ribbon AGAIN, and observe that the top of the taskpane seems to have fixed itself. It now says "Anaconda Toolbox".
  8. Click on Code icon in the ribbon. Observe that it now says "Anaconda Toolbox" -- i.e. it opened the wrong taskpane window.
  9. Because Code icon is associated with the long-running URL, the add-in is now broken until Excel is restarted.

Link to live example(s)

Grab the manifest at https://xltb.anaconda.cloud/manifest.xml or install from App Source. The add-in is live.

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.

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

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

shanshanzheng-dev commented 1 month ago

Hi @jim22k Thanks for reporting this issue. I can repro this. We'll be looking into the root cause and report back if we have a suggestion for you. Thanks.