From 67e7d9822a525822e50071aa403316cc8f9e0716 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 15 Nov 2024 11:13:15 -0700 Subject: [PATCH] Fix contextmenu by keyboard context button --- api/js/egw_action/EgwPopupActionImplementation.ts | 3 ++- api/js/egw_action/egw_keymanager.ts | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api/js/egw_action/EgwPopupActionImplementation.ts b/api/js/egw_action/EgwPopupActionImplementation.ts index 3f2fdecdab..09d5688e8d 100644 --- a/api/js/egw_action/EgwPopupActionImplementation.ts +++ b/api/js/egw_action/EgwPopupActionImplementation.ts @@ -526,7 +526,8 @@ export class EgwPopupActionImplementation implements EgwActionImplementation { const tree = {"root": []}; // Automatically add in Drag & Drop actions - if (this.auto_paste && !window.egwIsMobile()&& !this._context.event.type.match(/touch/)) { + if(this.auto_paste && !window.egwIsMobile() && !this._context.event?.type.match(/touch/)) + { this._addCopyPaste(_links, _selected); } diff --git a/api/js/egw_action/egw_keymanager.ts b/api/js/egw_action/egw_keymanager.ts index 849e5092f3..cb528d49c2 100755 --- a/api/js/egw_action/egw_keymanager.ts +++ b/api/js/egw_action/egw_keymanager.ts @@ -139,7 +139,10 @@ ready(() => {//waits for DOM ready window.addEventListener("contextmenu", function(event) { // Check for actual key press - if (!(event.originalEvent.x == 1 && event.originalEvent.y == 1)) return true; + if(!(event.x == 1 && event.y == 1)) + { + return true; + } if (!event.ctrlKey && egw_keyHandler(EGW_KEY_MENU, event.shiftKey, event.ctrlKey || event.metaKey, event.altKey)) { // If the key handler successfully passed the key event to some