diff options
| author | kamtschatka <simon.schatka@gmx.at> | 2024-10-20 00:04:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-19 23:04:14 +0100 |
| commit | cbc268ef9e3a30127d148eccec5fe64367de4201 (patch) | |
| tree | 241274be33c19e2e60c710955f259a67e4d2240d /apps/web/components/dashboard/bookmarks/EditorCard.tsx | |
| parent | 9a56e58bd54b2bfe11104e80c602493d720ff6be (diff) | |
| download | karakeep-cbc268ef9e3a30127d148eccec5fe64367de4201.tar.zst | |
feature(web): Add keyboard shortcut to focus on search bar. Fixes #449 (#554)
added ctrl+k to focus the search bar
added escape to delete the input of the search bar
fixed behavior of ctrl+e on windows, which would otherwise focus the chrome searchbar
Diffstat (limited to 'apps/web/components/dashboard/bookmarks/EditorCard.tsx')
| -rw-r--r-- | apps/web/components/dashboard/bookmarks/EditorCard.tsx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/web/components/dashboard/bookmarks/EditorCard.tsx b/apps/web/components/dashboard/bookmarks/EditorCard.tsx index d1489b09..4d851d1c 100644 --- a/apps/web/components/dashboard/bookmarks/EditorCard.tsx +++ b/apps/web/components/dashboard/bookmarks/EditorCard.tsx @@ -31,6 +31,7 @@ function useFocusOnKeyPress(inputRef: React.RefObject<HTMLTextAreaElement>) { } if ((e.metaKey || e.ctrlKey) && e.code === "KeyE") { inputRef.current.focus(); + e.preventDefault(); } } |
