Bug 1586800 - Use the contextual WalkerFront in _deleteNode(). r=pbro

Differential Revision: https://phabricator.services.mozilla.com/D48439
This commit is contained in:
Gabriel Luong
2019-10-08 06:59:39 +00:00
parent 1b4bd4470a
commit 4bf9cfe3f0

View File

@@ -167,13 +167,15 @@ class MarkupContextMenu {
return;
}
const nodeFront = this.selection.nodeFront;
// If the markup panel is active, use the markup panel to delete
// the node, making this an undoable action.
if (this.markup) {
this.markup.deleteNode(this.selection.nodeFront);
this.markup.deleteNode(nodeFront);
} else {
// remove the node from content
this.walker.removeNode(this.selection.nodeFront);
nodeFront.walkerFront.removeNode(nodeFront);
}
}