UnsuppressAndInvalidate -> SetReadyForFocus may cause unexpected side affect when it's triggered by Element::Focus
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: sefeng, Assigned: sefeng)
References
Details
Attachments
(1 file)
While updating the autofocus algorithm, I noticed this assertion is flaky.
I think what happened was when Element::Focus
run, we generated a new action id. And then FlushPendingNotifications
was triggered by FlushAndCheckIfFocusable
which might unsuppress the painting. If the parent document was not focused yet, SetReadyForFocus
would focus the parent document by generating an new action id, and this new action made the previous action id staled.
Sounds plausible Emilio?
Comment 1•2 years ago
|
||
Sounds believable. Seems it should be easy to fix by generating the action id inside SetFocusInner
rather than relying on the caller to provide it? Afaict most if not all callers just give a fresh focus action id.
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
This fixes an issue where Element::Focus triggered another focus
event and caused the initial focus event failed to be executed.
Updated•2 years ago
|
Comment 4•2 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:sefeng, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 5•2 years ago
|
||
I'll land this along with the patches for bug 1444491.
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ce06375518a7 Generate focus actionId in SetFocusInner rather than relying on the caller to provide it r=emilio,hsivonen
Comment 7•2 years ago
|
||
Backed out along with Bug 1444491 for causing failures on autofocus-attribute.svg
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7da0a39b1461 Generate focus actionId in SetFocusInner rather than relying on the caller to provide it r=emilio,hsivonen
Comment 9•2 years ago
|
||
bugherder |
Description
•