Pull request #173: fix comment input arrow keys navigation
Merge in RED/ui from RED-1403 to master * commit '251328d2d9762760235fa8e82383ba52e6652f9b': fix comment input arrow keys navigation
This commit is contained in:
commit
a772305291
@ -135,7 +135,7 @@ export class FileWorkloadComponent {
|
|||||||
|
|
||||||
@HostListener('window:keyup', ['$event'])
|
@HostListener('window:keyup', ['$event'])
|
||||||
handleKeyEvent($event: KeyboardEvent) {
|
handleKeyEvent($event: KeyboardEvent) {
|
||||||
if (!ALL_HOTKEY_ARRAY.includes($event.key) || this.dialogRef?.getState() === MatDialogState.OPEN) {
|
if (!ALL_HOTKEY_ARRAY.includes($event.key) || this.dialogRef?.getState() === MatDialogState.OPEN || ($event.target as any).localName === 'input') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ export class FileWorkloadComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public preventKeyDefault($event: KeyboardEvent) {
|
public preventKeyDefault($event: KeyboardEvent) {
|
||||||
if (COMMAND_KEY_ARRAY.includes($event.key)) {
|
if (COMMAND_KEY_ARRAY.includes($event.key) && !(($event.target as any).localName === 'input')) {
|
||||||
$event.preventDefault();
|
$event.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user