Cannot select content across top-level elements inside a shadow DOM within a custom element
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: xidorn, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Steps to reproduce:
- open the attached testcase
- try to select from the first paragraph to the second paragraph
Expected behavior:
You can select them.
Actual behavior:
You can't.
In this test case, both paragraphs are under the same shadow root, so it's not crossing a shadow boundary like bug 1455893. Also this only happens with custom element + shadow DOM. Simply adding the elements to a custom element or adding the elements to a shadow root of a normal element doesn't have this issue.
Comment 1•3 years ago
|
||
Mirko, do you have thoughts about this?
Thanks for filing the issue, Xidorn.
Indeed, this works with non-custom elements. Attached a testcase.
Moreover, it's not a a very recent issue, occurs on Firefox 94 as well as Nightly.
I don't see anything very obvious.
For the provided STR, the selection should contain exactly one range, therefore the bug might not be directly in Selection code. Maybe around nsFrameSelection
.
Comment 4•3 years ago
|
||
Change the status for beta to have the same as nightly and release.
For more information, please visit auto_nag documentation.
Reporter | ||
Comment 5•2 years ago
|
||
FWIW, I did some regression check, and it seems to me that this happens from the very beginning when Firefox started supporting shadow dom and custom element on Firefox 63.
Description
•