Fix contextmenu by keyboard context button

This commit is contained in:
nathan 2024-11-15 11:13:15 -07:00
parent 80cb0b1f9f
commit 67e7d9822a
2 changed files with 6 additions and 2 deletions

View File

@ -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);
}

View File

@ -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