wlxml: Node.hasChild(query)
[fnpeditor.git] / src / editor / modules / metadataEditor / metadataEditor.js
index 1088247..70df62e 100644 (file)
@@ -191,7 +191,7 @@ return function(sandbox) {
                 if(event.type === 'metadataRemoved' && event.meta.node.sameNode(currentNode)) {
                     view.removeMetadataRow(event.meta.row);
                 }
                 if(event.type === 'metadataRemoved' && event.meta.node.sameNode(currentNode)) {
                     view.removeMetadataRow(event.meta.row);
                 }
-                if(event.type === 'nodeDetached' && event.meta.node.sameNode(currentNode)) {
+                if(event.type === 'nodeDetached' && event.meta.node.containsNode(currentNode)) {
                     view.setMetadata(null);
                 }
             });
                     view.setMetadata(null);
                 }
             });