Repository navigation
Open
Labels
A-inputB-feature-trackingThis issue tracks a particular high-level featureB-metaThis issue tracks the status of multiple, related pieces of workI-spec-unclearA specification related to the issue in question is unclear.
Description
This bug tracks remaining issues in text input and selection in both text inputs and in the document.
- Implement DOM selections #7492
- DOM selection should be represented in the composed tree:
- Selection's
selectAllChildren()doesn't work with shadow roots #47119 - Selection's
extend()doesn't work with shadow boundaries #47118 - Selection's
setBaseAndExtent()does not work crossing shadow boundaries #47117 - Selection's
setBaseAndExtent()does not work with reordered slotted elements #47120 - Selections work incorrectly when
slotis removed from selected slotted element's parent #47121
- Selection's
- DOM selection should be represented in the composed tree:
- Add support for the
user-selectproperty #47896- Stringifier / clipboard copy (script: Stringify selections according to the flat tree /
user-select#48242) - Ensure style is up to day when calling
used_user_select()
- Stringifier / clipboard copy (script: Stringify selections according to the flat tree /
- Mouse
- Support selecting DOM text via the mouse #4409
- script: Collapse
Documentselection when focusing text inputs #48107 - script: Add
Documentselection copy/select all context menu options #48101 - Hit testing should find closest DOM position for selection regardless of whether it is a child of the hit node and take into account layout mode.
- Selecting beyond the edge of an input or the window should scroll
- script/layout: Add support for double/triple click selection extension #48767
- Caret/text selection positioning does not account for RTL text properly
- Support document selection by shift-clicking text #47898
- Keyboard
- Support Ctrl+A "Select All" to select all text in a page #47897
- Copying a selection via the keyboard (script: Fully integrate key event handling #48324)
- Changing the selection focus point via the keyboard
- Glyph
- Word
- Line
- Rendering
Completed
- Text selection is deleted on focus change Text selection deleted on focus change #39025
- Text is selected on focus Text in text input is selected on focus #39026
- Spacebar in text input causes click event #39028
- The caret will be shown at end of previous text segment in Text Area due to improper range calculation
- Mouse selection does not work within text area or text input input / textarea - mouse interaction doesn't work #10083
- The caret is not blinking No blinking cursor in editable elements #33237
- The caret/text selection does not account for multiple glyph runs within a
TextFragmentproperly - This also leads to potential crash when dealing with specifically text input due to a hack to prevent text input being trimmed Multi glyph runs in text input could crash #36449
- Caret will not be rendered when there's no text in text area
Metadata
Metadata
Assignees
Labels
A-inputB-feature-trackingThis issue tracks a particular high-level featureB-metaThis issue tracks the status of multiple, related pieces of workI-spec-unclearA specification related to the issue in question is unclear.
Activity
simonwuelker commentedon Apr 11, 2025
Would it make sense to render the text inside
<input>and<textarea>in a shadow tree to be able to reuse the existing selection code? We could even make non-placeholder text in input shadow trees to becontenteditable(once that attribute is implemented), which would presumably make a lot of input-specific magic go away.This is just a spontaneous idea i had when looking at this issue, I'm not sure if it would actually work.
MichaelMcDonnell commentedon Aug 29, 2025
MichaelMcDonnell commentedon Aug 29, 2025
[-]Tracking issue: Text input[/-][+]Tracking issue: Text input and selection[/+]script: Add initial support for updating Document selection with the …
script: Add initial support for updating Document selection with the …
script: Add initial support for updating Document selection with the …
yezhizhen commentedon Aug 26, 2026
The spec is unclear/outdated about shadow boundary.
See https://groups.google.com/a/chromium.org/g/blink-dev/c/HwQQqrbEfvc
https://github.com/mfreed7/shadow-dom-selection#readme
yezhizhen commentedon Aug 26, 2026
For example, it says:
However, it also says:
anchorNode
The attribute must return the anchor node of this, or null if the anchor is null or anchor is not in the document tree.
So
anchorNodecan never be in shadow tree. This is contradictory to tests:servo/tests/wpt/tests/selection/shadow-dom/tentative/Selection-isCollapsed.html
Line 48 in e83f311
opened w3c/selection-api#361
mrobinson commentedon Aug 26, 2026
I think this is a specification oversight, because
getComposedRanges()exists and is in Baseline Widely Available.script: Move `handle_mousedown_event` from `VirtualMethods` to `Editi…
script: Add initial support for updating Document selection with the …
script: Move `handle_mousedown_event` from `VirtualMethods` to `Editi…
script: Move `handle_mousedown_event` from `VirtualMethods` to `Editi…
script: Add initial support for updating Document selection with the …
yezhizhen commentedon Nov 15, 2026
Yeah this is under specified. Tentative tests are added w3c/selection-api#361 (comment) to investigate behaviour, and all browsers are behaving differently.
script: Move `handle_mousedown_event` from `VirtualMethods` to `Editi…