Skip to content

Commit

Permalink
fix: Tree Draggable does not work on Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
wangdaodao committed Aug 20, 2024
1 parent c345bb4 commit 30bd0fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/tree/src/tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,9 @@
this.$on('tree-node-drag-end', (event) => {
const { draggingNode, dropType, dropNode } = dragState;
event.preventDefault();
event.dataTransfer.dropEffect = 'move';
if (event.dataTransfer) {
event.dataTransfer.dropEffect = 'move';
}
if (draggingNode && dropNode) {
const draggingNodeCopy = { data: draggingNode.node.data };
Expand Down

0 comments on commit 30bd0fa

Please sign in to comment.