Some pending/discarded tabs are loaded when dragged to an existing window
Categories
(Firefox :: Tabbed Browser, defect, P3)
Tracking
()
People
(Reporter: tom_mozilla, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
- Have at least two windows, at least one of which has at least four tabs. The Auto Tab Discard extension is helpful but not required.
- Select a window with at least four tabs.
- Select the leftmost tab (tab 1).
- Discard the other tabs. If using the Auto Tab Discard extension, right-click on the active tab and select "Auto Tab Discard", then "Discard Other Tabs in This Window". Alternatively, restart Firefox and restore the session.
- Shift-click on tab 4 to highlight tabs 1-4.
- Click on tab 3 and drag the highlighted tabs to the tab bar of any other window.
- Repeat with different selections in steps 2, 4, and 5.
Actual results:
Tabs 1-4 are moved to the other window. Tab 1 remains loaded, tab 2 remains unloaded, tab 3 begins to load before moving, and tab 4 begins to load after moving.
More generally, any highlighted pending/discarded tabs to right of the active tab are loaded when moved to an existing window. This is consistent whether the left or right edge is selected first. The same tabs remain unloaded if moved to a new window instead, either by dragging or with the "Move to New Window" context menu item.
Expected results:
Pending/discarded tabs should remain pending/discarded when moved.
It looks like browser/components/sessionstore/test/browser_movePendingTabToNewWindow.js tries to test for this, but it uses the rightmost tab as the active tab, so no additional tabs are loaded.
![]() |
||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
This is implemented in browser/base/content/tabbrowser-tabs.js
. It looks like dragging tabs to an existing window uses on_drop
and dragging tabs to a new window uses on_dragend
.
Reporter | ||
Comment 2•5 years ago
|
||
on_dragend
calls gBrowser.replaceTabsWithWindow
, which says "to avoid multiple tab-switches in the original window, the other tabs should be adopted before the selected one". on_drop
appears to simply call adoptTab
on each tab sequentially. If I understand correctly, adopting the active tab activates the tab that was to its right, which is immediately adopted, activating the tab that was to its right, and so on.
Reporter | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Do you see the same thing when using the context menu and "move tab to new window" ?
Reporter | ||
Comment 4•5 years ago
|
||
(In reply to :Gijs (he/him) from comment #3)
Do you see the same thing when using the context menu and "move tab to new window" ?
The other tabs remain unloaded when using "Move to New Window" context menu item. I have a patch that makes on_drop
adopt the active tab last, which seems to fix the problem for dragging. The tabs.move
extension API appears to have the same problem, also from calling adoptTab
sequentially.
Reporter | ||
Updated•5 years ago
|
Comment 5•5 years ago
|
||
(In reply to Thomas Arnett from comment #4)
(In reply to :Gijs (he/him) from comment #3)
Do you see the same thing when using the context menu and "move tab to new window" ?
The other tabs remain unloaded when using "Move to New Window" context menu item. I have a patch that makes
on_drop
adopt the active tab last, which seems to fix the problem for dragging. Thetabs.move
extension API appears to have the same problem, also from callingadoptTab
sequentially.
A patch for this would be great, let me know if I can help in some way.
Updated•3 years ago
|
Yo, what happened with that patch? Could've closed this bug 3 years ago SMH
Comment 7•2 years ago
•
|
||
(In reply to movisivi from comment #6)
Yo, what happened with that patch? Could've closed this bug 3 years ago SMH
Thomas isn't employed by Mozilla. Please don't be rude to people, especially volunteer contributors.
Comment 8•2 years ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:dao, since the bug has recent activity, could you have a look please?
For more information, please visit auto_nag documentation.
Description
•