Open
Bug 1843388
Opened 1 years ago
Updated 1 years ago
WebExtensions: onMoved event fired before onCreated when recently closed tab (from Firefox history menu) is opened with middle click.
Categories
(WebExtensions :: General, defect, P5)
Tracking
(firefox115 affected, firefox116 affected, firefox117 affected)
NEW
People
(Reporter: maxbadryzlov, Unassigned)
References
Details
Attachments
(1 file)
36.63 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
Steps to reproduce:
(async () => {
// Create tab
const tab = await browser.tabs.create({ url: 'https://example.com', active: false })
// Wait
await new Promise(done => setTimeout(done, 2000))
// Close tab
await browser.tabs.remove(tab.id)
// Create new tab (it will force Firefox to move the reopened tab to previous position)
await browser.tabs.create({ active: false })
// Listen
browser.tabs.onCreated.addListener(tab => console.log('TAB CREATED, id:', tab.id))
browser.tabs.onMoved.addListener(id => console.log('TAB MOVED, id:', id))
// Then open Menu / History / Recently closed tabs
// And middle-click on the first "Example Domain" item
})()
Actual results:
Console output:
TAB MOVED, id: 7
TAB CREATED, id: 7
Expected results:
Console output:
TAB CREATED, id: 7
TAB MOVED, id: 7
Comment 1•1 years ago
|
||
Hello,
I reproduced the issue on the latest Nightly (117.0a1/20230716213402), Beta (116.0b6/20230716180334) and Release (115.0.2/20230710165010) under Windows 10 x64 and macOS 11.3.1.
Proceeding with the STR, the console output first logs TAB MOVED and then TAB CREATED. Opposite of what the expected results should be, as per Comment 0.
Fore more details, see the attached screenshot.
Status: UNCONFIRMED → NEW
status-firefox115:
--- → affected
status-firefox116:
--- → affected
status-firefox117:
--- → affected
Ever confirmed: true
Comment 2•1 years ago
|
||
Comment 3•1 years ago
|
||
FYI: This is not the only bug where onCreated
behaves unexpectedly - see bug 1763927 for another example.
You need to log in
before you can comment on or make changes to this bug.
Description
•