`HTMLEditor::AutoDeleteRangesHandler::AutoBlockElementsJoiner::DeleteTextAtStartAndEndOfRange()` may delete the text node
Categories
(Core :: DOM: Editor, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox127 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(1 file)
The method does not assume that given range is in a text node. Therefore, it may delete all text in the text node.
Assignee | ||
Comment 1•5 months ago
|
||
It assumes that the range is always starts and ends in different node. This
is true for now, but this will be called with a text node to delete only
preformatted line break. Note that the only caller of it does not need the
text node(s) if it becomes empty. Therefore, this patch makes it remove the
text node in such case.
Note that the test changed in
input-events-get-target-ranges-deleting-in-list-items.tentative.html
was
wrong and only Firefox passed it because the range description was
(#text "", 0) - (#text "", 10)
since the text nodes are removed after
deleting the text data of them. Now, they become
(#text "list-item1", 0) - (#text "list-item2", 10)
.
Depends on D207688
Description
•