diff --git a/src/webui/www/private/scripts/contextmenu.js b/src/webui/www/private/scripts/contextmenu.js index ad1b92d02..13d28625b 100644 --- a/src/webui/www/private/scripts/contextmenu.js +++ b/src/webui/www/private/scripts/contextmenu.js @@ -156,7 +156,7 @@ window.qBittorrent.ContextMenu ??= (() => { this.hide(); this.touchStartAt = performance.now(); this.touchStartEvent = e; - }); + }, { passive: true }); elem.addEventListener("touchend", (e) => { const now = performance.now(); const touchStartAt = this.touchStartAt; @@ -168,7 +168,7 @@ window.qBittorrent.ContextMenu ??= (() => { const isTargetUnchanged = (Math.abs(e.event.pageX - touchStartEvent.event.pageX) <= 10) && (Math.abs(e.event.pageY - touchStartEvent.event.pageY) <= 10); if (((now - touchStartAt) >= this.options.touchTimer) && isTargetUnchanged) this.triggerMenu(touchStartEvent, elem); - }); + }, { passive: true }); }, addTarget: function(t) { diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 5c87c4ccc..d87272893 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -274,7 +274,7 @@ window.qBittorrent.DynamicTable ??= (() => { const th = ths[i]; th.addEventListener("mousemove", mouseMoveFn); th.addEventListener("mouseout", mouseOutFn); - th.addEventListener("touchend", onTouch); + th.addEventListener("touchend", onTouch, { passive: true }); th.makeResizable({ modifiers: { x: "", @@ -762,7 +762,7 @@ window.qBittorrent.DynamicTable ??= (() => { this._this.deselectAll(); this._this.selectRow(this.rowId); } - }); + }, { passive: true }); tr.addEventListener("keydown", function(event) { switch (event.key) { case "up":