First inactive tab to be moved into another window loses laziness

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P3
normal
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: Oriol, Assigned: Oriol)

Tracking

unspecified
Firefox 67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

5 months ago
  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
Assignee

Comment 1

5 months ago

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

Updated

4 months ago
Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Assignee

Updated

4 months ago
Keywords: checkin-needed

Comment 3

4 months ago

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

Comment 5

4 months ago
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

Comment 6

4 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Assignee

Comment 7

4 months ago

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.