mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
3462eaa9e4
Once a parent node is removed from the tree, the node may become not editable because editable state "inherits" from ancestor nodes. `HTMLEditor::ClearStyleAt` cleans up unnecessary parent inline elements first, but if `<br>` element which should be reused in the block parent is contained the inline elements, `HTMLEditUtils::IsRemovableNode()` will start returning `false` for the `<br>` element because of in a document fragment which do not contain an element whose `contenteditable` is `true`. Then, `MoveNodeWithTransaction` fails to move it because of unremovable. Therefore, this patch makes the method move `<br>` element before removing inline elements and use `InsertNodeWithTransaction` instead if `<br>` element is an orphan node. Differential Revision: https://phabricator.services.mozilla.com/D182640 |
||
---|---|---|
.. | ||
composer | ||
docs | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.sys.mjs | ||
moz.build | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorSpellCheck.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsITableEditor.idl |