Closed Bug 1672786 Opened 4 years ago Closed 4 years ago

Delimiters inside <input type=date> should not be selectable (or the whole text should be selectable)

Categories

(Core :: Layout: Form Controls, defect)

defect

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: saschanaz, Assigned: saschanaz)

References

Details

Attachments

(3 files)

  1. Open https://mdn.mozillademos.org/en-US/docs/Web/HTML/Element/input/date$samples/Value?revision=1642094
  2. 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].)

How are you selecting them? I can't select the delimiters.

Attached image node selection

I drag from bottom-right to the top-left and it gets selected:

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/)

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.

Severity: -- → S3
Assignee: nobody → krosylight
Status: NEW → ASSIGNED
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/836fa52c6800 Disable selection within <input type=date> r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/26278 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Upstream PR merged by moz-wptsync-bot
See Also: → 1655992
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: