Probably use delegatesFocus for <input type=date/time/datetime-local> widget, rather than MozBlurInnerTextBox / MozFocusInnerTextBox
Categories
(Core :: DOM: Core & HTML, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox94 | --- | fixed |
People
(Reporter: emilio, Assigned: sefeng)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Right now we use hand-rolled code like this, which has various issues like not respecting FocusOptions.preventScroll
among others.
We should probably use focus delegation once that is landed and enabled everywhere.
Assignee | ||
Comment 1•3 years ago
|
||
Hey Emilio, I don't understand what needs to be done about this bug. Is the expected behaviour defined somewhere in spec and which logic can be reused here?
Reporter | ||
Comment 2•3 years ago
|
||
So we have some internal events (MozFocusInnerTextBox
/ MozBlurInnerTextBox
) to delegate the focus to the inner text fields inside the <input>
. Also, we have HTMLInputElement.setFocusState()
to manually set the focus state in the <input>
.
My understanding is that at least the events we could remove if we used delegateFocus
in the internal shadow tree of the <input>
element, is that wrong? That'd also give us the benefit of honoring FocusOptions
, which right now we don't for those input types.
Reporter | ||
Comment 3•3 years ago
|
||
Basically, delegatesFocus was designed to allow you to do exactly what these inputs do, minus the :focus-visible
bit perhaps...
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Currently datetimebox uses some hardcoded logic to find the edit
field inside the shadow tree and focus it.
Since we have delegatesFocus implemented, we could just use it without
these logic.
Updated•3 years ago
|
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d57de4af5089 Use delegatesFocus for <input type=date/time/datetime-local> widget r=emilio
Comment 6•3 years ago
|
||
bugherder |
Description
•