]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Change: allow modifier+arrow keyboard shortcuts in input fields
authorshamoon <4887959+shamoon@users.noreply.github.com>
Tue, 7 May 2024 16:10:38 +0000 (09:10 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Tue, 7 May 2024 16:10:38 +0000 (09:10 -0700)
src-ui/src/app/services/hot-key.service.ts

index 22a75758134bee33fe2e146b5eeba9944055fa97..e30364fc13ee1bd7b6f31d467d94aaf0858b3b77 100644 (file)
@@ -45,11 +45,13 @@ export class HotKeyService {
     return new Observable((observer) => {
       const handler = (e: KeyboardEvent) => {
         if (
-          !(e.altKey || e.metaKey || e.ctrlKey) &&
+          (!(e.altKey || e.metaKey || e.ctrlKey) ||
+            e.key.toLowerCase().includes('arrow')) &&
           (e.target instanceof HTMLInputElement ||
             e.target instanceof HTMLTextAreaElement)
         ) {
           // Ignore keydown events from input elements that dont have a modifier key
+          // or if the key is an arrow key to allow for navigation within the input
           return
         }