From 19ec96c5449bc212445d6627b0c6830e58c39cf5 Mon Sep 17 00:00:00 2001 From: Masahiko AMANO Date: Thu, 11 Jun 2026 17:43:24 +0300 Subject: [PATCH] feat(frontend): focus the page search box with / on the list sections Extends the global `/` shortcut to focus the always-on search input on Tags/Categories/Pools, matching what the help overlay advertises. Files keeps its own `/` handler since it has no persistent input and instead opens the filter bar. Co-Authored-By: Claude Opus 4.8 --- frontend/src/routes/+layout.svelte | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 1621fc5..e7a54e6 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -96,6 +96,18 @@ return; } + // Focus the page's search box. Pages with a persistent one (Tags/Categories/ + // Pools) are handled here; Files has no always-on input, so its own handler + // opens the filter instead. + if (e.key === '/') { + const input = document.querySelector('input[type="search"]'); + if (input) { + e.preventDefault(); + input.focus(); + } + return; + } + if (pendingG) { pendingG = false; clearTimeout(gTimer);