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

TST tab closing when MAC replaces container. #3099

Open
Sada-Mio opened this issue Mar 23, 2022 · 9 comments
Open

TST tab closing when MAC replaces container. #3099

Sada-Mio opened this issue Mar 23, 2022 · 9 comments
Labels
extension-compatibility conflict with another addon Firefox-issue bug of Firefox itself

Comments

@Sada-Mio
Copy link

Short description

Child tab is created with TST, but would disappear/close when MAC changes container, but only if parent tab is in discarded state.

Steps to reproduce

Structure:
A (discarded)
- B
- C (will disappear)

  1. Start Firefox with clean profile.
  2. Install TST.
  3. Install Auto Tab Discard.
  4. Install MAC. (Firefox Multi-Account Containers)
  5. Open new tab-A, visit google.com, set MAC to "always open this site in" a specific container such as "personal"
  6. Create child tab-B using TST
  7. Select tab-A, manual discard with Auto Tab Discard
  8. Select tab-B, create sibling tab-C with TST, type in address bar, press enter.
  9. Tab-C will disappear or close itself.

Expected result

Tab-C reopens in "personal" container keeping position in tree. Remains as a sibling of tab-B and child of Tab-A. This is the behavior in previous versions.

Actual result

Tab-C switches to new container by MAC since google.com is remember to always open in "personal", but get closed out. This only occurs if parent Tab-A is in discarded state.

Environment

  • Platform (OS): WIN10 64bit
  • Version of Firefox: 98.0.1
  • Version (or revision) of Tree Style Tab: 3.8.21
@Sada-Mio Sada-Mio changed the title Tabs closing after switching container TST tab closing with MAC container reopen Mar 23, 2022
@Sada-Mio Sada-Mio changed the title TST tab closing with MAC container reopen TST tab closing when MAC replaces container. Mar 23, 2022
@piroor
Copy link
Owner

piroor commented Mar 30, 2022

After some investigation, finally I've realized that this happens due to a bug or restriction of Firefox itself.

  • The tab C is actually closed by MAC always, regardless the parent tab is discarded or not. Here is the code closes the tab: https://github.com/mozilla/multi-account-containers/blob/cdd8ebc66a7101f33c62de7ab9d8d744f280c6d4/src/js/background/assignManager.js#L331-L356
  • MAC always tries to reopen the tab C via an API call like browser.tabs.create({ url: ..., openerTabId: (the ID of the tab A), ... }).
    • When the tab A is loaded, Firefox opens a new tab successfully.
    • On the other hand, when the tab A is discarded, Firefox fails to open a new tab. In other words, Firefox cannot open a new tab as a "child" tab of a discarded tab directly. (TST can do that, because TST just opens an independent new tab at the initial step, and attach it to a discarded parent at the ex-post step.)

@piroor piroor added extension-compatibility conflict with another addon Firefox-issue bug of Firefox itself labels Mar 30, 2022
@piroor
Copy link
Owner

piroor commented Mar 30, 2022

I've filed this problem at bugzilla.mozilla.org: 1762249 - tabs.create() fails when it is called with "openerTabId" for a discarded tab

@Sada-Mio
Copy link
Author

Sada-Mio commented Apr 3, 2022

Awesome, glad you found the cause of the bug and even assigned on bugzilla.

Another note: if too many of these events occur TST tab tree breaks, unable to scroll or select tabs. Sometimes entire browser would hang or freeze requiring force restart.

@github-actions github-actions bot added the stale no reaction got for a long term label Apr 4, 2023
@github-actions
Copy link

github-actions bot commented Apr 4, 2023

This issue has been labeled as "stale" due to no response by the reporter within 1 year (and 7 days after last commented by someone). And it will be closed automatically 14 days later if not responded.

@Sada-Mio
Copy link
Author

Sada-Mio commented Apr 4, 2023

bug still remains unfixed

@piroor piroor removed the stale no reaction got for a long term label Apr 4, 2023
Copy link

github-actions bot commented Apr 4, 2024

This issue has been labeled as "stale" due to no response by the reporter within 1 year (and 7 days after last commented by someone). And it will be closed automatically 14 days later if not responded.

@github-actions github-actions bot added the stale no reaction got for a long term label Apr 4, 2024
Copy link

This issue has been closed due to no response within 14 days after labeled as "stale", 7 days after last reopened, and 7 days after last commented.

@Sada-Mio
Copy link
Author

bug still exists

@piroor piroor reopened this Apr 22, 2024
@piroor piroor removed the stale no reaction got for a long term label Apr 22, 2024
@piroor
Copy link
Owner

piroor commented Apr 22, 2024

I have to update the patch https://phabricator.services.mozilla.com/D142644 for latest mozilla-central...

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

No branches or pull requests

2 participants