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: sefeng211, Assigned: sefeng211)
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•3 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.
| Assignee | ||
Comment 2•3 years ago
|
||
Thanks, I'll fix this
Updated•3 years ago
|
| Assignee | ||
Comment 3•3 years ago
|
||
This fixes an issue where Element::Focus triggered another focus
event and caused the initial focus event failed to be executed.
Updated•3 years ago
|
Comment 4•3 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•3 years ago
|
||
I'll land this along with the patches for bug 1444491.
Comment 7•2 years ago
|
||
Backed out along with Bug 1444491 for causing failures on autofocus-attribute.svg
Comment 9•2 years ago
|
||
| bugherder | ||
Description
•