Reviewed by mjs
[WebKit-https.git] / WebCore / editing / ReplaceSelectionCommand.cpp
index f8987fdd5f966e57d5456501dc3feaee3f1880b1..41c98d0965e5c5aa25e1947ef300ff246b26af3b 100644 (file)
@@ -697,6 +697,7 @@ void ReplaceSelectionCommand::doApply()
         
         while (node) {
             Node *next = node->nextSibling();
+            fragment.removeNode(node);
             insertNodeAfterAndUpdateNodesInserted(node.get(), refNode.get());
             refNode = node;
             node = next;