Incorrect content document focus after active toplevel OS window change
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox-esr91 | --- | wontfix |
firefox92 | --- | wontfix |
firefox93 | --- | wontfix |
firefox94 | --- | fixed |
People
(Reporter: karlt, Assigned: karlt)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
STR
- Set pref "focusmanager.testmode" to true.
- Open a content document b in a new toplevel OS window B from a focused content document a in OS window A.
(OS window B becomes active.) - Activate OS window A again through script (e.g. testharness) before content document b receives focus.
Expected: Content document a gets focus.
Actual: Content document b keeps focus.
Sequence of events:
- Toplevel chrome window A [7fbe4cdc5760] is initially active and element focus is moved to its browser element.
- The contained content window proxy a [7f173c9a1920] receives focus [actionid 20].
- Toplevel chrome window B [7fbe277fb060] is shown and becomes active [actionid 23].
- (Actionid 24 is a no-op B -> B toplevel chrome window change.)
focus()
is called on toplevel chrome window A [actionid 25] which queues a task to callWindowRaised()
.gBrowserInit.onDOMContentLoaded()
callsfocus()
on chrome window B's browser element [actionid 26], which focuses content window proxy b [7f173d1f83e0] in the content process.- The queued
WindowRaised()
records chrome window A as the active window and attempts to focus content window proxy a, but content process changes are dropped due to stale actionid 25.
Assignee | ||
Comment 1•3 years ago
|
||
Perhaps, there may exist an issue here that element focus changes are taking priority over active OS window changes with stale action IDs.
However, I don't know whether that could occur in practice without "focusmanager.testmode", given that active OS window changes usually GenerateFocusActionId()
at the time of the WindowRaised()
call.
https://treeherder.mozilla.org/jobs?repo=try&revision=138fd1fb15d3e0513b5a02b203161f1ee27fc1b2
Assignee | ||
Comment 2•3 years ago
|
||
for consistency with OS-triggered calls
https://searchfox.org/mozilla-central/rev/b022ae1fc071ad7a29f64f281bc19b7b093df538/xpfe/appshell/AppWindow.cpp#3005
and so that interleaved element-focus actions don't make the active toplevel
window change notification (and its associated content window focus changes)
stale.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 4•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Comment 5•3 years ago
|
||
Set release status flags based on info from the regressing bug 1618386
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•