From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 7 May 2024 16:10:38 +0000 (-0700) Subject: Change: allow modifier+arrow keyboard shortcuts in input fields X-Git-Tag: v2.8.2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fa08a9c96b452f68021f0304c836ed6e9ce91a9;p=thirdparty%2Fpaperless-ngx.git Change: allow modifier+arrow keyboard shortcuts in input fields --- diff --git a/src-ui/src/app/services/hot-key.service.ts b/src-ui/src/app/services/hot-key.service.ts index 22a7575813..e30364fc13 100644 --- a/src-ui/src/app/services/hot-key.service.ts +++ b/src-ui/src/app/services/hot-key.service.ts @@ -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 }