Treestyletab: External Tab in new window disappears when using Temporary Containers add-on

Created on 13 Apr 2021  路  6Comments  路  Source: piroor/treestyletab

Short description

If TST is used with the Temporary Container extension (set to Automatic mode), when you click on an external link (e.g. from Twitter or mail), the new FF window opens, then the new tab briefly appears in the sidebar for a second but then disappears. The page is still displayed correctly.

It appears the tab is hidden, as new tabs from links in the same page will correctly appear underneath, and you can rotate between all the tabs (including the hidden one) with Crtl-Tab.

Pressing F1 twice (hiding and then showing the sidebar) will cause the hidden tab to reappear.

Steps to reproduce

  1. Start Firefox with clean profile.
  2. Install TST.
  3. Install Temporary Containers add-on
  4. Set Firefox to open external links in a new window (about:config browser.link.open_newwindow.override.external = 2)
  5. Set Temporary Containers to Automatic mode
  6. Click on an external link in Twitter (Tweetbot), Mail or support page from Mac App store
  7. A new Firefox window will open, the tab in the sidebar will briefly display and then disappear as the page loads

Expected result

New window should open and the new Tab should be displayed in the sidebar.

Actual result

New window opens, the Tab briefly appears and then disappears (or is hidden).
Occasionally the tab does remain visible (maybe 1 time out of 10), but usually it disappears.

Environment

  • Platform (OS): MacOS 11.2
  • Version of Firefox: 87.0
  • Version (or revision) of Tree Style Tab: 3.7.4
fixed workaround exists

Most helpful comment

I just updated and checked some links.
The new windows are opening correctly with the tab showing.

Thank you very much for fixing this!

All 6 comments

There looks to be one more step to reproduce: setting browser.link.open_newwindow to 2. It is 3 by default and Firefox opens external links in tabs. But both changed options looks unnecessary to reproduce, I've successfully reproduced with the context menu command "open link in new window" on a link.

There is a workaround: closing and re-opening the sidebar, then TST shows the tab.

This means that TST successfully tracks the opened tab internally but failed to show it in the sidebar: TST updates the sidebar via asynchronous messages. Why reopening the sidebar solves the broken status is because reopened sidebar builds its contents synchronously with tab data fetched from the main process.

After a research I've realized that two errors happened in the case:

  • TST still tracked already closed tabs (immediately reopened by Temporary Containers) unexpectedly.
  • TST failed to rebuild sidebar contents triggered by detected mis-synchronization. This is due to the unexpectedly tracked already closed tab and still tracked tab elements already removed from the document.

Commits e1f42e0 and 1457fce should solve these problems.

Thank you very much for investigating this!
I'll check it out when the new version next updates.

@bengb 3.8.0 has been released. Can you verify if this has been fixed and close this item?

I just updated and checked some links.
The new windows are opening correctly with the tab showing.

Thank you very much for fixing this!

Was this page helpful?
0 / 5 - 0 ratings