Tree: address some draggable issues (#10494)

This commit is contained in:
杨奕
2018-03-31 14:29:09 +08:00
committed by GitHub
parent 4fe040d928
commit 10f5a661f5

View File

@@ -334,6 +334,13 @@
return false;
}
event.dataTransfer.effectAllowed = 'move';
// wrap in try catch to address IE's error when first param is 'text/plain'
try {
// setData is required for draggable to work in FireFox
// the content has to be '' so dragging a node out of the tree won't open a new tab in FireFox
event.dataTransfer.setData('text/plain', '');
} catch (e) {}
dragState.draggingNode = treeNode;
this.$emit('node-drag-start', treeNode.node, event);
});