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

[Bug] Opening tab in new window works, but the sidebar (with TST) is closed instead of open. Have to open it manually. #3594

Closed
nirurin opened this issue Jul 20, 2024 · 7 comments
Labels
bug Firefox-issue bug of Firefox itself

Comments

@nirurin
Copy link

nirurin commented Jul 20, 2024

Abstract

Steps to reproduce

  1. Start Firefox with clean profile.
  2. Install TST.
  3. Open a tab
  4. Right-click, open in new window
  5. New window will open, but TST sidebar is closed.

Expected result

Sidebar with TST should be open by default in the new window.

Actual result

It isn't open by default.

Environment

  • Platform (OS): Windows 11
  • Version of Firefox: 128
  • Version (or revision) of Tree Style Tab: 4.0.20
@piroor
Copy link
Owner

piroor commented Jul 29, 2024

Sadly it is a problem of FIrefox itself. TST and any other WebExtensions API based addons cannot control initial state of the sidebar for new windows.

@piroor piroor added Firefox-issue bug of Firefox itself and removed needs-triage labels Jul 29, 2024
@irvinm
Copy link
Contributor

irvinm commented Nov 9, 2024

@piroor we should probably close this one. There is not likely to ever be any changes with regards to this.

@piroor
Copy link
Owner

piroor commented Nov 11, 2024

I've researched again to consider possibility to implement the feature "controlling visibility of TST sidebar for newly opened windows", and finally I realized that it is sadly impossible. The API to open sidebar is not callable except handlers for the toolbar button or keyboard shortcuts.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/sidebarAction/open
The restriction is clearly designed behavior, so I think it won't be loosen. I hope to keep this issues tracker as the place to track unresolved problems possible resolved, so I close this for now.

@piroor piroor closed this as completed Nov 11, 2024
@MithicSpirit
Copy link

Is there an upstream issue for showing the sidebar automatically on new windows?

@piroor
Copy link
Owner

piroor commented Nov 11, 2024

There are two possible way to do "show TST sidebar in newly opened window", and they have different blockers.

Idea 1:

  1. Call windows.create() with an option to specify the initial sidebar contents.
  2. But there is no such option to do that. We cannot open a new window with opened sidebar.

Idea 2:

  1. Call windows.create().
  2. Call sidebarAction.open() to open the sidebar in the window.
  3. But the operation is not allowed. We cannot open TST sidebar for a newly opened window. As described at the API document, this kind operation is intentionally restricted.

@MithicSpirit
Copy link

Seems to be fixed now.

@piroor
Copy link
Owner

piroor commented Dec 15, 2024

Firefox saves the last sidebar state when the last browser window is closed.
https://searchfox.org/mozilla-central/rev/e6733c6143dc6a1bd32c9c65d685528deb1ba895/browser/components/sidebar/browser-sidebar.js#440-449
If you see a new browser window with closed sidebar, I recommend you to try closing the last browser window with opened sidebar and restart Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Firefox-issue bug of Firefox itself
Projects
None yet
Development

No branches or pull requests

4 participants