Forward-deleting empty paragraph keeps a linebreak in designMode=true
Categories
(Core :: DOM: Editor, defect)
Tracking
()
People
(Reporter: saschanaz, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
|
186 bytes,
text/html
|
Details |
- Open the attachment
- Put the caret at the end of the first paragraph
- Press Delete button to delete in forward direction
Expected: The last paragraph should disappear
Actual: It keeps a linebreak that never disappears by forward deletion
| Reporter | ||
Updated•5 years ago
|
| Reporter | ||
Comment 1•5 years ago
|
||
| Reporter | ||
Comment 2•5 years ago
|
||
This somehow does not repro with contenteditable but only with designMode. Contenteditable shows another bug that undoing introduces duplicated paragraphs, though.
| Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
| Reporter | ||
Comment 3•5 years ago
|
||
Modifying HTMLEditor::IsVisibleBRElement to consider a lonely <br> inside a block as visible fixes this.
But the function looks like a duplicate of nsLayoutUtils::IsInvisibleBreak, do we have a reason not to call it instead?
Comment 4•5 years ago
|
||
Probably, it's duplicated for that editor won't be broken by layout team's changes. As you know, editor module does not have enough automated tests even though its functions are really complicated (especially before WPT comes into the tree). So, the isolation must have been important for this reason.
And also, nsLayoutUtils::IsInvisibleBreak() refers layout information. It returns correct and actual state, but it may require latest layout information. For example, immediately after inserting a <br> element, it returns different result unless you flush pending notifications. If we did it, perhaps, execCommand speed would become slower and some benchmark score might become worse. So, I think that we should keep current style unless the difference of them causes actual problem.
| Reporter | ||
Comment 5•5 years ago
|
||
Haven't been working on it, unassigning myself...
Description
•