Closed
Bug 1488026
Opened 6 years ago
Closed 6 years ago
onAttached fired before onDetached for the last tab
Categories
(WebExtensions :: Frontend, enhancement)
WebExtensions
Frontend
Tracking
(firefox64 fixed)
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: Oriol, Assigned: Oriol)
Details
Attachments
(1 file)
Run this code: browser.tabs.onAttached.addListener(function(...args) { console.log("onAttached", ...args); }); browser.tabs.onDetached.addListener(function(...args) { console.log("onDetached", ...args); }); If you drag a tab between windows, you will see first an onDetached event and then the onAttached one. However, if the dragged tab is the last one in its old window, that window will close, and onAttached will appear first. This is not supposed to happen: https://searchfox.org/mozilla-central/rev/c8483bebfa09173b1db5590b3c19f42270d819c9/browser/components/extensions/parent/ext-browser.js#508-509 Chrome does it right.
Assignee | ||
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment on attachment 9005909 [details] Bug 1488026 - Always fire onDetached event before onAttached. r=mixedpuppy Shane Caraveo (:mixedpuppy) has approved the revision.
Attachment #9005909 -
Flags: review+
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Pushed by btara@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f7bddc0708f1 Always fire onDetached event before onAttached. r=mixedpuppy
Keywords: checkin-needed
Comment 4•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f7bddc0708f1
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Comment 5•6 years ago
|
||
Hello, I've attempted to validate this bug using the above info, but the code shown does not seem to yield any result, could you please clarify the STR or if manual testing is not required set the “qe-verify -“ flag. Thanks!
Flags: needinfo?(oriol-bugzilla)
Assignee | ||
Comment 6•6 years ago
|
||
The output appears in the console. Covered by automated tests anyway
Flags: needinfo?(oriol-bugzilla) → qe-verify-
You need to log in
before you can comment on or make changes to this bug.
Description
•