From 24d349ffbaceb55ef1b5873d7ae9e95633fd8b70 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 25 Nov 2024 23:12:34 +0800 Subject: [PATCH] WebUI: fix wrong event property --- src/webui/www/private/scripts/contextmenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/www/private/scripts/contextmenu.js b/src/webui/www/private/scripts/contextmenu.js index 38dd70696..00ea280a4 100644 --- a/src/webui/www/private/scripts/contextmenu.js +++ b/src/webui/www/private/scripts/contextmenu.js @@ -160,7 +160,7 @@ window.qBittorrent.ContextMenu ??= (() => { this.touchStartAt = null; this.touchStartEvent = null; - const isTargetUnchanged = (Math.abs(e.event.pageX - touchStartEvent.event.pageX) <= 10) && (Math.abs(e.event.pageY - touchStartEvent.event.pageY) <= 10); + const isTargetUnchanged = (Math.abs(e.changedTouches[0].pageX - touchStartEvent.changedTouches[0].pageX) <= 10) && (Math.abs(e.changedTouches[0].pageY - touchStartEvent.changedTouches[0].pageY) <= 10); if (((now - touchStartAt) >= this.options.touchTimer) && isTargetUnchanged) this.triggerMenu(touchStartEvent, elem); }, { passive: true });