tabs.move of a single tab to a new window reverses tabs when the index is the same as the index of the other tab in the split
Categories
(WebExtensions :: Frontend, defect)
Tracking
(firefox150 fixed, firefox151 fixed)
People
(Reporter: robwu, Assigned: robwu)
References
(Blocks 1 open bug)
Details
(Whiteboard: [addons-jira])
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
The logic here assumes that the specified insertion point is in the same window, but does not check isSameWindow:
https://searchfox.org/firefox-main/rev/98bf4b92d3f5d7a9855281df4bf333210bcfbbc4/browser/components/extensions/parent/ext-tabs.js#1254-1257
Consequently, if an extensions had a split view consisting of tabId0 and tabId1, and called browser.tabs.move(tabId0, { windowId, index }) where windowId is for a different window, and index is coincidentally the same as the index of tabId1, then the moved split view will have its tabs reversed. That is unintentional.
This logic landed in 150, let's fix and uplift this.
| Assignee | ||
Comment 1•22 days ago
|
||
Updated•21 days ago
|
| Assignee | ||
Comment 3•18 days ago
|
||
I don't know why this bug was not automatically closed, but I can clearly see that the above patch has made it into Nightly 151.0a1 buildID 20260404090830, by observing the addition of the single-line change from the patch ( } else if (isSameWindow) { ) in chrome://browser/content/parent/ext-tabs.js
Moreover, when I check the main branch of the git repo, I see that eb6082f582dce843b61b43950f095d035f4b8123 is present.
The autoland commit above also shows that the commit was included in Nightly.
Comment 4•18 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Fixes edge case in extension API for split views, added in bug 2016762.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Add a missing check where needed in the extension API, fully covered by automated tests, with no chance of any unexpected consequences.
- String changes made/needed?: None
- Is Android affected?: no
| Assignee | ||
Comment 5•18 days ago
|
||
Updated•18 days ago
|
Updated•17 days ago
|
Updated•17 days ago
|
Description
•