Closed Bug 1521923 Opened 1 year ago Closed 1 year ago

First inactive tab to be moved into another window loses laziness

Categories

(Firefox :: Tabbed Browser, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

Details

Attachments

(1 file)

  1. Let a window have 3 tabs, activate the 1st one.

  2. Enable session restore, restart Firefox, focus that window.

  3. Press Shift and click the 2nd tab so that tabs 1,2 are multiselected with the 1st active.

  4. Open browser console and check that the 2nd tab is lazy:

    gBrowser.tabs[1].linkedPanel === ""
    
  5. Right-click a multiselected tab, chose "Move Tabs > Move to New Window"

  6. Close browser console, focus the new window, open browser console and enter

    gBrowser.tabs[1].linkedPanel === ""
    
  7. It should still be true but now it's false. The tab is no longer lazy.

Bug 1521346 fixes this problem except for the first inactive tab in the multiselection. That one is moved using window.openDialog instead of gBrowser.adoptTab, so it's still unlazified. Should be fixed here.

Depends on: 1521346
Priority: -- → P3
See Also: 1521346

I guess the problem is that when the first tab is moved into the new window, at that point it's the active tab there, so it's loaded.
Moving the active tab of the old window first would avoid this problem, however this will change the selected tab in the old window, maybe to a lazy multiselected tab that is going to be moved afterwards.
So I guess a mitigation would be to check if, among the tabs to be moved, there is an inactive one which is not lazy, and move it first.
If all the inactive tabs are lazy, then the only option seems to open the new window with a blank tab, move the tabs, and close the blank tab.

Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Keywords: checkin-needed

Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/51ffa59f1488
Preserve lazyness of the first inactive tab moved into a new window. r=jaws

Keywords: checkin-needed
Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ab719ccd5501
Preserve lazyness of the first inactive tab moved into a new window. r=jaws CLOSED TREE
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67

The failure was caused by bug 1531025.

Flags: needinfo?(oriol-bugzilla)
You need to log in before you can comment on or make changes to this bug.