When a tab group is in the only thing in a window, dragging it to another window leaves an empty window
Categories
(Firefox :: Tabbed Browser, defect, P3)
Tracking
()
People
(Reporter: sthompson, Assigned: sthompson)
References
(Blocks 1 open bug)
Details
(Keywords: regressionwindow-wanted, Whiteboard: [fidefe-tabgrps-dnd])
Attachments
(2 files)
Nightly 141.0a1 (2025-05-28) (aarch64)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:141.0) Gecko/20100101 Firefox/141.0
Steps to reproduce:
- Open two tabs, A and B
- Create a tab group for tab B
- Drag the tab group label outside of the browser window and drop it -- this should trigger the behavior to create a new window containing only the dragged tab group
- In the new window, drag the tab group label and drop it back into the original window
Actual results:
The tab group correctly moves back to the original window. The new window remains in place, but there is nothing in the tab strip. The URL bar contains the URL of the previously active tab, but the browser panel has no content.
Expected results:
The tab group correctly moves back to the original window. The new window automatically closes because there is no longer anything in that window.
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
I can reproduce this in the following scenarios:
- tab group was moved to a new window using drag-drop
- tab group was created manually in a new window using the tab context menu
The new window automatically closes as expected in the following scenarios:
- tab group was moved to new window from tab group context menu
- tab group was moved to new window from list all tabs menu context menu
- tab group was created in a new window in a previous session that was restored manually
Not sure exactly what to make of it. It seems like the aCloseWindow from _endRemoveArgs is false for the last tab to be adopted when things go wrong, whereas that value is true when things go correctly.
I haven't dug much further. This logic in Tabbrowser caught my eye https://searchfox.org/mozilla-central/rev/932e5cded30452c4f009b4f9254021f8b9895217/browser/components/tabbrowser/content/tabbrowser.js#4829-4833 and I wondered if perhaps the collapsed-during-drag state of the tab group could interfere with window closing behavior, but I don't see why that behavior would vary based on the different scenarios I listed above.
Comment 2•1 year ago
|
||
This is just a guess, but could this be a regression from bug 966594?
| Assignee | ||
Comment 3•1 year ago
|
||
Aha, I didn't notice that the code I linked had just changed in bug 1966594. Yeah, I'll test that, but it looks this is a regression.
| Assignee | ||
Comment 4•1 year ago
|
||
I can reproduce with the original code in place
| Assignee | ||
Comment 5•1 year ago
|
||
When a window consists only of a tab group and its tabs, dragging the tab group into the tab strip of another window can leave the starting window in a broken, empty state.
The normal behavior when dragging a tab group is to temporarily collapse the tab group, but this seems to have an unintended interaction with the Tabbrowser logic that decides whether to close a window when the last tab is removed. At the time of the last tab being removed, it is in a temporarily collapsed group and therefore not visible.
This patch hardens the logic for calculating whether a tab is the last tab in a window. It ensures that the window will close if the last tab in the window is in a collapsed tab group.
Updated•1 year ago
|
Comment 8•1 year ago
|
||
Backed out for causing failures complaining about tabs.
Backout link: https://hg-edge.mozilla.org/integration/autoland/rev/740dab811f0b8563cbb9a5551dafca20b4cf9531
Failure log: https://treeherder.mozilla.org/logviewer?job_id=511960161&repo=autoland&lineNumber=1481
Comment 10•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Reproduced with Firefox 141.0a1 (2025-05-28) on macOS 15.
Verified as fixed with Firefox 142.0a1 (20250626214351) and Firefox 141.0b3 (20250627042037) on macOS 14, Windows 10 and Ubuntu 22.
| Assignee | ||
Updated•11 months ago
|
Description
•