Skip to content

Commit

Permalink
Fixed #4536 - ContextMenu: global property is not working
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Oct 3, 2023
1 parent 1827b6e commit 7c3218c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions components/lib/contextmenu/ContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ export default {
if (ObjectUtils.isNotEmpty(newPath)) {
this.bindOutsideClickListener();
this.bindResizeListener();
this.bindDocumentContextMenuListener();
} else if (!this.visible) {
this.unbindOutsideClickListener();
this.unbindResizeListener();
this.unbindDocumentContextMenuListener();
}
}
},
Expand Down Expand Up @@ -358,7 +356,6 @@ export default {
onAfterEnter() {
this.bindOutsideClickListener();
this.bindResizeListener();
this.bindDocumentContextMenuListener();
this.$emit('show');
DomHandler.focus(this.list);
Expand All @@ -374,7 +371,6 @@ export default {
this.unbindOutsideClickListener();
this.unbindResizeListener();
this.unbindDocumentContextMenuListener();
},
position() {
let left = this.pageX + 1;
Expand Down Expand Up @@ -446,7 +442,7 @@ export default {
bindDocumentContextMenuListener() {
if (!this.documentContextMenuListener) {
this.documentContextMenuListener = (event) => {
event.button !== 2 ? this.show(event) : this.hide();
event.button === 2 && this.show(event);
};
document.addEventListener('contextmenu', this.documentContextMenuListener);
Expand Down

0 comments on commit 7c3218c

Please sign in to comment.