fix problem with delete
authorJan Szejko <janek37@gmail.com>
Tue, 14 Mar 2017 12:30:30 +0000 (13:30 +0100)
committerJan Szejko <janek37@gmail.com>
Tue, 27 Mar 2018 14:35:29 +0000 (16:35 +0200)
(cherry picked from commit 3030a9e)

src/smartxml/core.js

index 7326507..f8b128d 100644 (file)
@@ -517,6 +517,9 @@ var documentTransformations = {
                     nextNext = next ? next.next() : null;
                     toDetach.detach({normalizeStrategy: (next && next.sameNode(params.to.node)) ? 'merge' : 'detach-right'});
                     if(next && !next.isInDocument()) {
+                        if(next.sameNode(params.to.node)) {
+                            return;
+                        }
                         next = nextNext;
                     }
                 }