piroor / treestyletab

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

[Bug] Multi-Account Containers "Hide" action destroys trees. #3302

Open QORTEC opened 1 year ago

QORTEC commented 1 year ago

Abstract

Trees are destroyed on Multi-Account Containers "Hide This Container" action.

Steps to reproduce

  1. Start Firefox with clean profile.
  2. Install TST.
  3. Install Multi-Account Containers
  4. Create a tree in a Container
  5. Hide the container containing the tree
  6. Show the container with the tree

Expected result

The tree is preserved, and in the same state as it was before being hidden.

Actual result

The tree is destroyed, all the tabs are now on the 1st level (roots).

Environment

piroor commented 1 year ago

Did you try the option?: TST options => "Tree Behavior" => "When visibility of tabs are changed by other addons" => "Keep tree structure including hidden tabs"

QORTEC commented 1 year ago

Yes, it would seem I have the option enabled; TST When visible

piroor commented 1 year ago

Thanks, I've confirmed. I've tried to research what's happen at the situation, and I've finally realized that MAC moves tabs in hidden container when they are going to be shown. TST tries to fixup broken tree structure based on tab's position when they are moved by other addons or any user operation on the horizontal tab bar. So, for example, assume that there are tabs with containers:

When you try to turn the container "Personal" shown, MAC does:

  1. Move B to the index 1.
  2. Move B2 to the index 3. Tabs become:
    • A [default]
    • B [Personal, hidden]
      • B2 [Personal, hidden]
    • B1 [Personal, hidden]
  3. Move B2 to the index 3. Tabs become:
    • A [default]
    • B [Personal, hidden]
    • B1 [Personal, hidden]
    • B2 [Personal, hidden]
  4. Finally you got flat tabs.

TST expects that showing/hiding tabs won't be moved while changing its visibility. This is the reason why shown tabs become flat after you just turn them visible. Hmm...