mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
Tree: address some draggable issues (#10494)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user