Delimiters inside <input type=date> should not be selectable (or the whole text should be selectable)
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
Details
Attachments
(3 files)
- Open https://mdn.mozillademos.org/en-US/docs/Web/HTML/Element/input/date$samples/Value?revision=1642094
- Try selecting the text inside the element
The delimiters (/
for me) are unexpectedly selectable, while actual date numbers are not. It should be consistent.
Since the element has its own Selection area (it can't be selected together with its siblings), I guess blocking selection for now is the way to go.
See also bug 1669996 as this also causes leaking internal nodes. (No security issue as the resulting object is sealed as [Restricted]
.)
Comment 1•4 years ago
|
||
How are you selecting them? I can't select the delimiters.
Assignee | ||
Comment 2•4 years ago
|
||
I drag from bottom-right to the top-left and it gets selected:
Assignee | ||
Comment 3•4 years ago
|
||
BTW, I see it's already using shadow DOM: https://searchfox.org/mozilla-central/rev/25d5a4443a7e13cfa58eff38f1faa5e69f0b170f/toolkit/content/widgets/datetimebox.js
Weird that it still can't be selected with nearby nodes. Do we have a bug for this? (I can also see same behavior in other shadow DOM demos: https://radogado.github.io/shadow-dom-demo/)
Assignee | ||
Comment 4•4 years ago
•
|
||
Easier repro. Try selecting from foo to bar or in reverse direction. The text selection suddenly disappears and is replaced with selection inside <input>, which is probably bug 1455893.
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Updated•4 years ago
|
Comment 8•4 years ago
|
||
bugherder |
Description
•