smartxml: fix changing node's tag
[fnpeditor.git] / src / smartxml / smartxml.js
index 80ee43c..9a3ba26 100644 (file)
@@ -107,6 +107,7 @@ $.extend(ElementNode.prototype, DocumentNode.prototype, {
         });
         node.setData(this.getData());
 
+        this._$.replaceWith(node._$);
         this._setNativeNode(node._$[0]);
         this.triggerChangeEvent('nodeTagChange', {oldTagName: oldTagName, newTagName: this.getTagName()});
     },