Skip to content

Commit

Permalink
fix(header-search): "Escape" should clear search query (#1851)
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym authored Nov 20, 2023
1 parent d68dc18 commit 6da4572
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/UIShell/HeaderSearch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@
selectedResultIndex -= 1;
}
break;
case 'Escape':
// Reset the search query but keep the search bar active.
// Do not dispatch "clear" event as that should fire only on the "x" button.
value = '';
selectedResultIndex = 0;
break;
}
}}"
on:paste
Expand Down

0 comments on commit 6da4572

Please sign in to comment.