feat(frontend): focus the page search box with / on the list sections
deploy / deploy (push) Successful in 18s
deploy / deploy (push) Successful in 18s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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<HTMLInputElement>('input[type="search"]');
|
||||
if (input) {
|
||||
e.preventDefault();
|
||||
input.focus();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (pendingG) {
|
||||
pendingG = false;
|
||||
clearTimeout(gTimer);
|
||||
|
||||
Reference in New Issue
Block a user