editor: remove code supporting main editing area sidebar as it's not used anymore
[fnpeditor.git] / src / editor / modules / documentCanvas / canvas / canvas.js
index 8ca71ac..05c109c 100644 (file)
@@ -138,8 +138,10 @@ $.extend(Canvas.prototype, Backbone.Events, {
     },
 
     reloadRoot: function() {
+        if(this.rootElement) {
+            this.rootElement.detach();
+        }
         this.rootElement = this.createElement(this.wlxmlDocument.root);
-        this.rootWrapper.empty();
         this.rootWrapper.append(this.rootElement.dom);
     },