Closed
Bug 1809364
Opened 1 year ago
Closed 1 year ago
tabs.move is broken when moving multiple tabs into a different window
Categories
(WebExtensions :: Frontend, defect, P3)
WebExtensions
Frontend
Tracking
(firefox-esr102 wontfix, firefox108 wontfix, firefox109 wontfix, firefox110 wontfix, firefox111 fixed)
RESOLVED
FIXED
111 Branch
People
(Reporter: Oriol, Assigned: Oriol)
References
(Regressed 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file)
So, bug 1323311 tried to improve browser.tabs.move
, but:
- The logic doesn't really make sense (e.g. why use 2 different maps to track indices?).
- It broke moving multiple tabs between windows, they appear in the wrong order. That's because it used
nativeTab._tPos > insertionPoint
whereinsertionPoint
may be referring to a different window so comparing with_tPos
is wrong.
Assignee | ||
Comment 1•1 year ago
|
||
Bug 1323311 tried to improve browser.tabs.move, but the logic didn't
really make sense (e.g. why use 2 different maps to track indices?),
and it broke moving multiple tabs between windows: they would appear
in the wrong order.
Assignee | ||
Comment 2•1 year ago
|
||
Example:
var tabs = await Promise.all([
browser.tabs.create({url: "about:blank?1", index: 1}),
browser.tabs.create({url: "about:blank?2", index: 2}),
browser.tabs.create({url: "about:blank?3", index: 3}),
]);
var win2 = await browser.windows.create();
browser.tabs.move(tabs.map(t => t.id), {index: 0, windowId: win2.id})
The tabs in the new window will be about:blank?1
, about:blank?3
, about:blank?2
, New Tab.
The order should be about:blank?1
, about:blank?2
, about:blank?3
, New Tab.
Comment 3•1 year ago
|
||
Set release status flags based on info from the regressing bug 1323311
status-firefox108:
--- → affected
status-firefox109:
--- → affected
status-firefox110:
--- → affected
status-firefox-esr102:
--- → affected
Updated•1 year ago
|
Updated•1 year ago
|
Severity: -- → S4
Priority: -- → P3
Pushed by oriol-bugzilla@hotmail.com: https://hg.mozilla.org/integration/autoland/rev/e402dcbe2983 Make tabs.move on multiple tabs more reliable (2). r=robwu
Comment 5•1 year ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
status-firefox111:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
Updated•1 year ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•