Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab-specific sidePanel inconsistencies when opening new tabs/switching tabs #588

Open
twschiller opened this issue Apr 11, 2024 · 3 comments
Assignees
Labels
follow-up: chrome Needs a response from a Chrome representative needs-triage: firefox Firefox needs to assess this issue for the first time neutral: safari Not opposed or supportive from Safari

Comments

@twschiller
Copy link

twschiller commented Apr 11, 2024

Context

  • The sidePanel API lets you create tab-specific panels: https://developer.chrome.com/docs/extensions/reference/api/sidePanel#type-OpenOptions
  • The behavior of tab-specific panels is inconsistent across Chrome/MS Edge:
    • Chrome: if a tab has a tab-specific sidePanel and you open a new tab, the sidePanel remains in the original tab (In my opinion, this is the preferred behavior)
    • MS Edge: the sidePanel in the original tab is closed if you open a new tab. Therefore, the user loses any form state, etc. that was in that sidePanel
  • Is that inconsistency intentional? Or a bug in the MS Edge implementation of the API?

Related Discussions

Related Bugs/Other Issues

@github-actions github-actions bot added needs-triage: chrome Chrome needs to assess this issue for the first time needs-triage: firefox Firefox needs to assess this issue for the first time needs-triage: safari Safari needs to assess this issue for the first time labels Apr 11, 2024
@twschiller twschiller changed the title Per-tab sidePanel inconstencies when opening new tabs/switching tabs Tab-specific sidePanel inconstencies when opening new tabs/switching tabs Apr 11, 2024
@dotproto dotproto changed the title Tab-specific sidePanel inconstencies when opening new tabs/switching tabs Tab-specific sidePanel inconsistencies when opening new tabs/switching tabs Apr 11, 2024
@oliverdunk oliverdunk added follow-up: chrome Needs a response from a Chrome representative and removed needs-triage: chrome Chrome needs to assess this issue for the first time labels Apr 23, 2024
@oliverdunk oliverdunk self-assigned this Apr 23, 2024
@oliverdunk
Copy link
Member

Adding follow-up label to confirm Chrome's current implementation is the desired behavior (I think it is).

@mukul-p
Copy link
Collaborator

mukul-p commented Apr 25, 2024

I observed similar behaviour with these two samples on Edge and Chrome
https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/functional-samples/cookbook.sidepanel-open
https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/functional-samples/cookbook.sidepanel-multiple

Oliver, please check if these are expected.
Todd, can you respond on the Edge specific Github issue with more details (and a sample).

This issue is deemed to be Chromium specific, I am not sure what is expected from the other browser triages.

@xeenon xeenon added neutral: safari Not opposed or supportive from Safari and removed needs-triage: safari Safari needs to assess this issue for the first time labels Apr 25, 2024
@twschiller
Copy link
Author

twschiller commented Apr 25, 2024

Todd, can you respond on the Edge specific Github issue with more details (and a sample).

@mukul-p you'd like me to open an issue here: https://github.com/microsoft/MicrosoftEdge-Extensions/issues? Or respond on the discussion? microsoft/MicrosoftEdge-Extensions#144

In our extension, we use chrome.sidePanel.setOptions to set the tab-specific page (on browser action), and pass a tabId in a query parameter so the panel is aware of what tab it's associated with:

chrome.sidePanel.setOptions({
  tabId,
  path: `/sidebar.html?tabId=${tabId}`,
});

Our expectation/desired behavior is just that when our extension opens a tab-specific panel on a page, it's not automatically closed when the user opens a new tab/switches tabs.

As an aside, I suspect the MS Edge behavior might be the cause/correlated with a browser crash when clicking a target _blank link in a tab-specific panel: microsoft/MicrosoftEdge-Extensions#145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
follow-up: chrome Needs a response from a Chrome representative needs-triage: firefox Firefox needs to assess this issue for the first time neutral: safari Not opposed or supportive from Safari
Projects
None yet
Development

No branches or pull requests

4 participants