From de1cf208ce74c8abae353450f285632f930bc273 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 12 Apr 2025 17:59:42 +0800 Subject: [PATCH] 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. --- src/webui/www/private/scripts/client.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index a85b9d420..6a7511293 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -1515,7 +1515,9 @@ window.addEventListener("DOMContentLoaded", () => { }, column: "mainColumn", onResize: window.qBittorrent.Misc.createDebounceHandler(500, (e) => { - saveColumnSizes(); + const isHidden = (parseInt(document.getElementById("propertiesPanel").style.height, 10) === 0); + if (!isHidden) + saveColumnSizes(); }), height: null });