Elements with shadow root break text selection on a page
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: info, Unassigned)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36
Steps to reproduce:
I stumbled upon this question on StackOverFlow, demonstrating a potentially erronous behaviour with text selection in conjunction with elements that have a shadow root. The problem exists for both shadow modes (open, closed): https://stackoverflow.com/questions/58318004/element-with-shadow-root-breaks-text-selection
Actual results:
Pressing CTRL-A on a page with elements that have a shadow root results in all text select except the text in the shadow roots. This is unexpected (and Chrome does not behave this way).
Furthermore, trying to select text on the page with the mouse becomes very awkward, with the selection being undone as soon as dragging the mouse hits an element with a shadow root.
Expected results:
Text selection should not be affected at all by shadow roots, be the selection done using either keyboard or mouse.
I was able to reproduce the reported behaviour on Firefox 69.0.2 (64-bit)/Windows 10, Firefox 69.0.1 (64-bit)/Mac OS Mojawe, Firefox 69.0.2 (64-bit)/Arch Linux.
Reporter | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Description
•