Closed Bug 1663797 Opened 4 years ago Closed 4 years ago

Make deletion handler of `HTMLEditor` never touch the basic structure of HTML document

Categories

(Core :: DOM: Editor, defect, P2)

defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

Currently, HTMLEditor tries to join <body> element with <head> element when you type Backspace at start of <body> element and <html> has contenteditable attribute. However, of course, it'll fail in deep point in the handler, but that makes partially done something at the preparation. Instead, deletion handler should quit earlier.

This bug makes writing patches for bug 1658702 harder so that I'll fix this soon.

It'll fail to join them when its utility methods actually join them.
However, it should be considered earlier timing because the preparation
DOM tree changes before joining them causes creating odd tree (see the
removed cases of the test). Therefore, we should make them stop handling
deletion before modifying the DOM tree.

Depends on D89579

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/361a026ea1f6 Make delete handler of `HTMLEditor` not try to join `<html>`, `<head>` and `<body>` r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Regressions: 1671197
No longer regressions: 1671197
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: