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] changing --tab-size breaks tab drag #3519

Closed vitaliylag closed 5 months ago

vitaliylag commented 6 months ago

Abstract

Steps to reproduce

  1. Start Firefox with clean profile.
  2. Install TST.
  3. Use this style:
    :root {
    --tab-size: 28px;
    }
    1. Open at least few tabs. The more tabs you open the bigger difference between expected cumulative tab size and cumulative --tab-size. If the difference is not enough the bug will not occur.
    2. Try to drag the last tab to previous tab.

Expected result

The size is changed and all other functions work fine.

Actual result

The size is changed but when you try to drag one tab to another you cannot create a new subtree. So if target tab does not have children the source tab cannot become the child of target tab.

Also even if target tab already has children it's become impossible to move the tab to the end of it's child list. It's possible to move to any other position though so you can move source tab to the position before last child and then swap last 2 children but it's not convenient.

It worked fine before last big update.

Environment

Possible fast way to fix

Add "tab-size" option to add-on settings. It probably will fix the bug (because the value in Javascript will match the css value) and it also will be convenient for users.

piroor commented 6 months ago

Thanks, the commit bd24eb6 should fix this. Here is a workaround user style sheet:

#dummy-tabs tab-item {
  height: var(--tab-size);
}
piroor commented 6 months ago

Updated: I've introduced more changes around tab size calculation priority. The workaround in my previous comment need to be removed after a new release containing those changes is released.

github-actions[bot] commented 5 months ago

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