We already support keyboard text selection (with Shift + arrows) in <input>
, but it’s invisible. This issue is about changing the text color and background color of selected text, like other browsers do. Colors can be hard-coded at first, #8077 is about adding a ::selection
pseudo-element to change them with CSS.
I don’t know if we’re better off splitting text fragments in layout at selection boundaries, or only splitting display items. @pcwalton, do you have an opinion on this?
CC @paulrouget
See also #4410 and #4409.
The right thing is to split fragments but not text runs, I believe. That's because anything you can style as one unit in CSS needs to be a fragment, but anything ligatures work across needs to be one text run.
I've started working on the layout parts of this (fragment splitting and display list generation).
Most helpful comment
I've started working on the layout parts of this (fragment splitting and display list generation).