From a45bcf0e10aa6a1b1c55bd9b644507b3c6b31b2d Mon Sep 17 00:00:00 2001 From: Oliver Pulges Date: Mon, 16 Jun 2014 17:01:35 +0300 Subject: [PATCH] Fix uneditable subsequent element remove --- src/dom/parse.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dom/parse.js b/src/dom/parse.js index 6fe3ac8..b14acc6 100644 --- a/src/dom/parse.js +++ b/src/dom/parse.js @@ -139,6 +139,9 @@ wysihtml5.dom.parse = (function() { if (oldChilds[i]) { newChild = _convert(oldChilds[i], cleanUp); if (newChild) { + if (oldChilds[i] === newChild) { + i--; + } fragment.insertBefore(newChild, fragment.firstChild); } } @@ -172,6 +175,9 @@ wysihtml5.dom.parse = (function() { if (oldChilds[i]) { newChild = _convert(oldChilds[i], cleanUp); if (newChild) { + if (oldChilds[i] === newChild) { + i--; + } newNode.appendChild(newChild); } }