From e8dc6b3f738917e186c75fc956ea632be9081ea4 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello <8296030+Piccirello@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:28:01 -0700 Subject: [PATCH] WebUI: Show file filter when Content tab selected on load This fixes a bug where the file filter is only shown when the Content tab is switched to. The filter is not being shown if the Content tab is already selected on page load (due to being previously selected). PR #21657. --- src/webui/www/private/scripts/client.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index c122e1757..566ba159e 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -1506,6 +1506,10 @@ window.addEventListener("DOMContentLoaded", () => { const showFilesFilter = (selectedTab.id === "propFilesLink") && !this.isCollapsed; document.getElementById("torrentFilesFilterToolbar").classList.toggle("invisible", !showFilesFilter); }); + + const showFilesFilter = (lastUsedTab === "propFilesLink") && !this.isCollapsed; + if (showFilesFilter) + document.getElementById("torrentFilesFilterToolbar").classList.remove("invisible"); }, column: "mainColumn", height: prop_h