WebUI: avoid saving invalid size

Don't save the wrong size when the tab is collapsed.
Reported in: https://github.com/qbittorrent/qBittorrent/pull/21215/files#r1966052959

PR #22537.
This commit is contained in:
Chocobo1 2025-04-12 17:59:42 +08:00 committed by GitHub
commit abafbc0685
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1515,7 +1515,9 @@ window.addEventListener("DOMContentLoaded", () => {
}, },
column: "mainColumn", column: "mainColumn",
onResize: window.qBittorrent.Misc.createDebounceHandler(500, (e) => { onResize: window.qBittorrent.Misc.createDebounceHandler(500, (e) => {
saveColumnSizes(); const isHidden = (parseInt(document.getElementById("propertiesPanel").style.height, 10) === 0);
if (!isHidden)
saveColumnSizes();
}), }),
height: null height: null
}); });