-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
5.0.0rc1 - "Open link in new tab" opening out of position #1102
Comments
I'm hitting the exact same issue, also starting today with 5.0.0rc1. Edit: Closing the side bar and reopening it causes the tab tree to be rendered accurately, until the next time you open new tabs, at which point those are added in incorrect positions. So Sideberry clearly knows where things are supposed to be, |
Alright, looking at the code, I have a strong suspicion that the problem is commit 40d3941. To paste from the commit:
The problem is that addToVisibleTabs is finding in panel.tabs, and then using that index in panel.reactive.visibleTabIds. But based on recalcVisibleTabsInPanel, if there are any filtered tabs or if there are any invisible tabs, that index won't match what's in panel.reactive.visibleTabIds at all. I would suggest that in addToVisibleTabs we search on panel.reactive.visibleTabIds instead, because that gives us the correct index to splice into. If that fails, then the same call to recalcVisibleTabs is the right option. |
Indeed, that fixes it! I can do a quick PR if need be. :) |
This fixes mbnuqw#1102, "Open link in new tab" opening out of position.
@zelch Thank you, no need, a few minutes and I'll release rc2 |
@mbnuqw ... I actually opened a PR just before you commented. :) (And an unrelated PR that has been on my todo list for a few months now.) |
Fixed in v5.0.0rc2 |
@mbnuqw Looking at your change, what happens if we open a new tab while we have filtered tabs? Not that my newer function (below) solves that problem either, as it assumes that the new tab will always be visible, which may not be accurate when in a filtered tab view. Perhaps a check for panel.filteredTabs which calls recalcVisibleTabs? That seems like the least painful way to handle such a rare corner case.
|
The |
Steps to reproduce
Expected behavior
New child tabs visually appear in their tree.
Actual behavior
New child tabs visually appear out of their tree, but are still properly attached to their parent tab.
Collapsing and expanding any tree corrects their position.
Noticed this today after automatically updating to 5.0.0rc1. The issue is not present if downgraded to 5.0.0b33.
Some visual examples on a new profile: Single trees. Nested trees.
Debug info
Addon data
Logs
The text was updated successfully, but these errors were encountered: