From b1d2b9d02bb4ff9e4305358d5f856cfc5af09306 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 12 Aug 2024 15:14:17 +0800 Subject: [PATCH] WebUI: fix wrong property for keyboard keys Fix up 2d9e3b333047d7d80368458cb0ce480205dc1410. PR #21182. --- src/webui/www/private/scripts/dynamicTable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 9e8cf9d57..b8af2dacb 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -224,7 +224,7 @@ window.qBittorrent.DynamicTable ??= (() => { const onDrag = function(el, event) { if (this.currentHeaderAction === "resize") { - let width = this.startWidth + (event.page.x - this.dragStartX); + let width = this.startWidth + (event.event.pageX - this.dragStartX); if (width < 16) width = 16; this.columns[this.resizeTh.columnName].width = width; @@ -743,14 +743,14 @@ window.qBittorrent.DynamicTable ??= (() => { e.preventDefault(); e.stopPropagation(); - if (e.control || e.meta) { + if (e.ctrlKey || e.metaKey) { // CTRL/CMD ⌘ key was pressed if (this._this.isRowSelected(this.rowId)) this._this.deselectRow(this.rowId); else this._this.selectRow(this.rowId); } - else if (e.shift && (this._this.selectedRows.length === 1)) { + else if (e.shiftKey && (this._this.selectedRows.length === 1)) { // Shift key was pressed this._this.selectRows(this._this.getSelectedRowId(), this.rowId); }