Opening new tabs from collapsed tab group adds them to the end
Categories
(Firefox :: Tabbed Browser, defect, P2)
Tracking
()
People
(Reporter: sfleiter, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fidefe-tabgrps])
STR
- Make sure
browser.tabs.insertAfterCurrent,browser.tabs.insertRelatedAfterCurrentandbrowser.tabs.loadInBackgroundaretrue - Create a tab group with multiple tabs in it
- Select first tab in group
- Collapse Tab group
- Open a new tab f.e. via context menu on a link
Actual result
- Opened tab is created as last tab in the closed tab group
Expected result
- Tab should be next to the first one from where it was created from
Bug 1997096 might be related.
| Reporter | ||
Comment 1•4 months ago
|
||
Even after Bug 1997096 is fixed on Nightly, that tab group is now opened but the tab is still added at the end of the group effectively ignoring the (default) value of browser.tabs.insertRelatedAfterCurrent.
Comment 2•3 months ago
|
||
Thank you for the report. When we open a link in a new tab with insertRelatedAfterCurrent, the code in https://searchfox.org/firefox-main/rev/ac7d7c131dd65058ad6b7ecfa65dc8f31a0f203e/browser/components/tabbrowser/content/tabbrowser.js#4360 identifies the correct index to place the tab. However, we are indexing into dragAndDropElements (and very recently, ariaFocusableItems, with the same semantics) which only has visible items in its array. As a result, the code inserts the tab before the next visible tab, which is the first tab that comes after the entire tab group. This is an edge case that we missed when adding the feature from bug 1971232 to allow the active tab to be in a collapsed tab group.
Updated•3 months ago
|
Description
•