Input focus not updated properly when type attribute changes
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox107 | --- | fixed |
People
(Reporter: issammani, Assigned: emilio)
Details
Attachments
(2 files)
| Reporter | ||
Comment 1•3 years ago
•
|
||
While working on 1767250, we discovered that when the type attribute is mutated onclick from button to text we end up in an undefined focus state, where :focus-visible is not applied but the element is focused.
For context, here is a codesandbox with a minimal reproduction of the issue. When clicking the button, the resulting text input should have the outer focus ring.
Comment 2•3 years ago
|
||
I suspect this belongs to Core::Widget, please move back if I'm wrong
Comment 3•3 years ago
|
||
The severity field is not set for this bug.
:spohl, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 4•3 years ago
|
||
(In reply to Issam Mani [:issammani] from comment #1)
While working on 1767250, we discovered that when the
typeattribute is mutated onclick from button to text we end up in an undefined focus state, where:focus-visibleis not applied but the element is focused.
For context, here is a codesandbox with a minimal reproduction of the issue. When clicking the button, the resulting text input should have the outer focus ring.
If :focus-visible isn't applied but the element is focused, it seems to indicate that the widget-level is working correctly but the front-end fails to apply :focus-visible. This is even more likely if this reproduces on all platforms.
I can't think of the best component for this, so I'm going to assign it to Firefox > General for further triage.
Updated•3 years ago
|
| Assignee | ||
Comment 6•3 years ago
|
||
| Assignee | ||
Comment 7•3 years ago
|
||
Seems somewhat reasonable to do this, if we wanted to, since
nsFocusManager also makes these always match :focus-visible.
If you think it's worth doing I can add a test quite trivially.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 8•3 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:emilio, 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 | ||
Updated•3 years ago
|
Comment 10•3 years ago
|
||
Comment 12•3 years ago
|
||
| bugherder | ||
Description
•