Skip to content

Commit

Permalink
Tree: stopPropagation and preventDefault for node-contextmenu if bound (
Browse files Browse the repository at this point in the history
  • Loading branch information
furybean authored and Leopoldthecoder committed Mar 14, 2018
1 parent 5797325 commit 0c8523b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/tree/src/tree-node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@
},
handleContextMenu(event) {
if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) {
event.stopPropagation();
event.preventDefault();
}
this.tree.$emit('node-contextmenu', event, this.node.data, this.node, this);
},
Expand Down

0 comments on commit 0c8523b

Please sign in to comment.