Fixed #4536 - ContextMenu: global property is not working

pull/4542/head
Tuğçe Küçükoğlu 2023-10-03 14:20:43 +03:00
parent 1827b6e9c9
commit 7c3218cef2
1 changed files with 1 additions and 5 deletions

View File

@ -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();
}
}
},
@ -358,7 +356,6 @@ export default {
onAfterEnter() {
this.bindOutsideClickListener();
this.bindResizeListener();
this.bindDocumentContextMenuListener();
this.$emit('show');
DomHandler.focus(this.list);
@ -374,7 +371,6 @@ export default {
this.unbindOutsideClickListener();
this.unbindResizeListener();
this.unbindDocumentContextMenuListener();
},
position() {
let left = this.pageX + 1;
@ -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);