mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Change: allow modifier+arrow keyboard shortcuts in input fields
This commit is contained in:
parent
8ea3259fe7
commit
4fa08a9c96
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue