piroor / treestyletab

Tree Style Tab, Show tabs like a tree.
http://piro.sakura.ne.jp/xul/treestyletab/
Other
3.48k stars 279 forks source link

[Bug] Move to New Window button causes all tab bars to reload twice after the new window opens #3523

Closed hhyyrylainen closed 5 months ago

hhyyrylainen commented 5 months ago

Abstract

When I use the "Move to New Window" option for a tab, that causes the tab bars of all of my Firefox windows to reload after the new window opens. As this takes many seconds with a lot of tabs this is hindering my workflow quite a bit. Also this might be a separate bug but I've now noticed that when moving a tab with child tabs to a new window, the tab no longer takes the child tabs with it, which is also affecting my usual workflow.

As additional context I remember the same bug happening once before a couple of years ago. I think it was fixed with a bugfix release back then as after some weeks the bug stopped happening.

Steps to reproduce

  1. Start Firefox with clean profile.
  2. Install TST.
  3. Install TST More Tree Commands.
  4. Open at least two tabs.
  5. Right click the second tab and use "Move to New Window"
  6. The tab moves to another window (but its child tabs don't, this seems to be also a new bug / changed behaviour in the latest version)
  7. Notice how both windows briefly reload the side tab bar
  8. This only happens with my normal Firefox profile with a ton of tabs: the tab reload takes multiple seconds and immediately after it completes it happens again this is what makes this bug very annoying.

Screenshots:

Kuvakaappaus - 2024-04-09 09-49-34

Kuvakaappaus - 2024-04-09 09-49-47

This shows how after opening the second window both it and the main window are currently reloading the tab bars (though with just 2 total tabs this is very quick)

Expected result

I expect at most the new window to reload the side tab bar not all other windows reloading their tabs which takes multiple seconds.

Actual result

All windows reload their tab bars, and then immediately after completing the reload doing it again (only in my default Firefox profile with a ton of tabs).

Environment

piroor commented 5 months ago

The tab moves to another window (but its child tabs don't, this seems to be also a new bug / changed behaviour in the latest version)

This result is from TST options => "Tree Behavior" => "When a parent tab is Closed or Moved" => "Recommended preset using the browser's native tab bar as the Solo Tab Operation UI". "Recommended preset using Consistent Tab Behaviors controlled under TST" will move descendant tabs together on this case.

hhyyrylainen commented 5 months ago

If I understood your message correctly, this is the setting I should use:

image

I was already using that setting. I tried the other mode as well but it did the same thing (child tabs didn't move).

piroor commented 5 months ago

Hmm, it is strange... Anyway I've introduced a change b05acbc to enforce the "Move to New Window" command to move whole tree.

piroor commented 5 months ago

After more research I've realized that the sidebar panel can be reloaded accidentally by a listener left registered unintentionally. The commit e1a574b should reduce such a needless reloading of the sidebar. Could you try the latest development build of TST? Instructions: https://github.com/piroor/treestyletab?tab=readme-ov-file#development-builds

hhyyrylainen commented 5 months ago

I downloaded the test build and got it working in a clean firefox profile that didn't have TST installed already. I was able to test that the two problems I noticed are gone with that build. I hope that when made into a proper release it all works fine as currently when I tried to install that update to a firefox profile that already had TST installed that caused the move to new window option to stop entirely working. But that just might be an effect of loading it as a temporary plugin update. Thanks for the very quick responses.

AKruimink commented 5 months ago

Not sure if it's related at all to this. Im currently running 4.0.13 (and Firefox 124.0.2 (64-bit) on Windows), and cannot get tabs to open in new windows what so ever.

When using the 'Move To New Window' nothing happens (it's not greyed out). And when dragging the tab outside of TTS, instead of opening in a new window, it just display a blocked mouse pointer (circle with stripe) and the tab just jumps back to TTS.

I tried using Firefox it's native tab's and they work just fine. Already reinstalled TTS as well, which doesnt seem to fix it either. I changed the Tree behaviour to what is shown in the image above, this to didn't change anything.

hhyyrylainen commented 5 months ago

Not sure if it's related at all to this. Im currently running 4.0.13 (and Firefox 124.0.2 (64-bit) on Windows), and cannot get tabs to open in new windows what so ever.

I just noticed that that started happening to me yesterday as well. I hadn't restarted my computer or firefox when that new problem started happening.

bennettscience commented 5 months ago

I noticed the same behavior on Windows. Here's the console output when trying to move a tab to a new window:

Uncaught (in promise) Error: Type error for parameter createData (Error processing left: Expected integer instead of null) for windows.create.
    openNewWindowFromTabs moz-extension://cb9b7a44-0223-4733-a17e-7bd12231a72b/background/tree.js:1669
    openTabsInWindow moz-extension://cb9b7a44-0223-4733-a17e-7bd12231a72b/background/commands.js:958
    openTabInWindow moz-extension://cb9b7a44-0223-4733-a17e-7bd12231a72b/background/commands.js:940
    onClick moz-extension://cb9b7a44-0223-4733-a17e-7bd12231a72b/background/tab-context-menu.js:1223
[tree.js:1669:45](moz-extension://cb9b7a44-0223-4733-a17e-7bd12231a72b/background/tree.js)

piroor commented 5 months ago

@bennettscience Thanks, I missed fullscreen or maximized window cases. The commit 05ea7cb should fix the error.

github-actions[bot] commented 5 months ago

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