Open Bug 1927968 (better-block-element-deletion) Opened 1 year ago Updated 1 year ago

Implement better block element handling at delete/backspace

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

People

(Reporter: masayuki, Unassigned)

References

(Blocks 5 open bugs)

Details

(Keywords: parity-chrome)

Basically, Chrome does not delete new empty blocks when deleting all visible content in a block. However, if direct ancestor <div> elements become empty, they will be deleted. Additionally, when deleting/backspace in an empty block which has only <br> will be deleted. (If 2 or more paragraphs become empty, all blocks will be joined first to the leftmost block in Chrome. Then, if the leftmost block is a <div>, it'll be deleted.)

On the other hand, Gecko deletes new empty blocks immediately. I think that Chrome's behavior is better for avoiding unexpected deletion for users. Additionally, web-platform tests may pass only with the Chrome's behavior. So, aligning this behavior to chrome helps our development too.

You need to log in before you can comment on or make changes to this bug.