Text can not be deleted from a non-DIV contenteditable element under a ShadowRoot
Categories
(Core :: DOM: Editor, defect)
Tracking
()
People
(Reporter: james, Assigned: masayuki)
Details
Attachments
(2 files)
Steps to reproduce:
Attempt the following actions on the third line:
- press Backspace or Delete with a non-collapsed selection
- cut a text selection with ctrl-x
- press Delete with a collapsed selection
Actual results:
The text is not deleted.
Expected results:
The text should have disappeared.
Text can still be deleted from non-DIV elements outside the ShadowRoot, or DIV elements within the ShadowRoot.
My user agent string is "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0". The exact version is Firefox Nightly 125.0a1.
Comment 1•7 months ago
|
||
I can reproduce this issue on Nightly125.0a1 Windows10.
And I can also reproduce even on Firefox102, 90, 78. So, this does not seem to be a regression.
Assignee | ||
Comment 2•7 months ago
|
||
I guess that it's caused by that there is no block ancestor of the <span>
in the shadow DOM.
Assignee | ||
Updated•7 months ago
|
Assignee | ||
Comment 3•7 months ago
|
||
It's currently handling its job with the closest ancestor block which may be
non-editable and editing host which is either inline or block. However, the
closest block is required for check whether the range won't be extended outside
the closest block of the common ancestor of the range and the range is
guaranteed that they are in an editing host. Therefore, it's not required if
it's outside the editing host. So, comparisons which check whether a node is
either/neither editing host or/nor ancestor block can get same result with
comparing with the closest one of the editing host or the closest editable
block.
Comment 6•7 months ago
|
||
bugherder |
Updated•6 months ago
|
Comment 8•6 months ago
|
||
Reproducible on a 2024-02-25 Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 126.0a1 and Firefox 125.0 on macOS 12, Windows 10, Ubuntu 22.
Description
•