WebUI: Fix row selection by Shift key with virtual list enabled

Fixes #23336.
PR #23543.
This commit is contained in:
tehcneko 2025-11-30 19:14:30 +08:00 committed by GitHub
parent 564afc975f
commit 296c90d688
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -761,13 +761,13 @@ window.qBittorrent.DynamicTable ??= (() => {
}
let select = false;
for (const tr of this.getTrs()) {
if ((tr.rowId === rowId1) || (tr.rowId === rowId2)) {
for (const row of this.getFilteredAndSortedRows()) {
if ((row.rowId === rowId1) || (row.rowId === rowId2)) {
select = !select;
this.selectedRows.push(tr.rowId);
this.selectedRows.push(row.rowId);
}
else if (select) {
this.selectedRows.push(tr.rowId);
this.selectedRows.push(row.rowId);
}
}
this.setRowClass();