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

How to set the focus of custom tab to remain static #3805

Open arshadansari10 opened 1 year ago

arshadansari10 commented 1 year ago

Hi,

I have created an excel addin project using custom tab ribbon that loads at very last tab but the focus shifts to Home tab each time I perform any operation using that custom tab. I want the custom tab ribbon focus position to remain fixed each time I perform any operation.

Requirement : - I want the default focus to be remain on SystenicsXL

Please advice it will be very helpful.....

image

AlexJerabek commented 1 year ago

Hi @arshadansari10,

This seems like a product bug. I'm going to transfer this issue to the office-js repo. There, the product team can work with you to investigate a fix.

EsterBergen commented 1 year ago

Hi @arshadansari10 - Thanks for highlighting this! Did you experience this bug on all platforms? Or was it on excel for the web? excel on mac? or excel on windows?

arshadansari10 commented 1 year ago

I have tested it in excel on web and excel on windows and I m getting the same issue in both

EsterBergen commented 1 year ago

@arshadansari10 - I can't repro this for other add-ins so i'm thinking this may be a code error vs. a general bug. Do you know if this tab is a contextual tab? Or is it a custom tab?

https://learn.microsoft.com/en-us/office/dev/add-ins/design/contextual-tabs https://learn.microsoft.com/en-us/office/dev/add-ins/design/custom-tab-placement

arshadansari10 commented 1 year ago

i m using custom tab. At least when I m performing any operation on the button of my custom ribbon by selecting that ribbon by myself. The focus shifts back to home tab. If at least this could be solved then it will be very helpful.

arshadansari10 commented 1 year ago

For more information: Consider the situation that when I create a table using excel addin code which is present as a button in Custom tab ribbon and as the table loads - Table Design tab display and then the custom ribbon tab automatically shifts back to Home Tab

arshadansari10 commented 12 months ago

Hi, Any update for the above bug

EsterBergen commented 8 months ago

Hi @arshadansari10 - Apologies for the delay here. A few follow-up questions. When you insert the table, what are the actions that causes the shift back to home? Do you navigate away from the active cell in the table itself?

Have you tried different placements of the custom tab to ensure that it remains active? https://learn.microsoft.com/en-us/office/dev/add-ins/design/custom-tab-placement

arshadansari10 commented 8 months ago

Hi

I m creating multiple tables on different sheets dynamically and as the table gets created the focus of custom tab changes to home.

Also I had tried different placements of custom tab but unfortunately that supports in web version of PowerPoint as mentioned in the article shared by you but I m using Excel

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: esterB @.> Sent: Wednesday, March 13, 2024 10:45:25 PM To: OfficeDev/office-js @.> Cc: Arshad Ansari @.>; Mention @.> Subject: Re: [OfficeDev/office-js] How to set the focus of custom tab to remain static (Issue #3805)

Hi @arshadansari10https://github.com/arshadansari10 - Apologies for the delay here. A few follow-up questions. When you insert the table, what are the actions that causes the shift back to home? Do you navigate away from the active cell in the table itself?

Have you tried different placements of the custom tab to ensure that it remains active? https://learn.microsoft.com/en-us/office/dev/add-ins/design/custom-tab-placement

— Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/office-js/issues/3805#issuecomment-1995046137, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7XLTEIRFFH6HGWDSY6TXCTYYCCS3AVCNFSM6AAAAAA63JOZ26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJVGA2DMMJTG4. You are receiving this because you were mentioned.Message ID: @.***>

arshadansari01 commented 3 months ago

Hi, any updates on this open issue?