Fix: adding/clearing node widgets corrupted widgets on all children nodes
[fnpeditor.git] / modules / documentCanvas / canvas / wlxmlManagers.js
index 0aa9575..e70cfd2 100644 (file)
@@ -11,11 +11,11 @@ var DocumentElementWrapper = function(documentElement) {
     this.documentElement = documentElement;
 
     this.addWidget = function(widget) {
-        documentElement.dom().find('.canvas-widgets').append(widget);
+        documentElement.dom().children('.canvas-widgets').append(widget);
     };
 
     this.clearWidgets = function() {
-        documentElement.dom().find('.canvas-widgets').empty();
+        documentElement.dom().children('.canvas-widgets').empty();
     }
 
     this.setDisplayStyle = function(displayStyle) {