RED-7011: Allow arrow up / down in textareas (spotlight search issue))

This commit is contained in:
Adina Țeudan 2023-06-27 02:09:55 +03:00
parent 61877840c2
commit 53c6e8a5b3
2 changed files with 5 additions and 5 deletions

View File

@ -42,20 +42,20 @@ export class SpotlightSearchComponent {
this.shownActions[this._currentActionIdx].action(this.valueChanges$.getValue());
}
@HostListener('document:keydown.arrowDown', ['$event'])
@HostListener('document:keydown.arrowUp', ['$event'])
@HostListener('keydown.arrowDown', ['$event'])
@HostListener('keydown.arrowUp', ['$event'])
handleKeyDown(event: KeyboardEvent): void {
event.preventDefault();
}
@HostListener('document:keyup.arrowDown', ['$event'])
@HostListener('keyup.arrowDown', ['$event'])
handleKeyUpArrowDown(event: KeyboardEvent): void {
this.handleKeyDown(event);
const index = this._currentActionIdx + 1;
this._currentActionIdx$.next(index >= this.shownActions.length ? 0 : index);
}
@HostListener('document:keyup.arrowUp', ['$event'])
@HostListener('keyup.arrowUp', ['$event'])
handleKeyUpArrowUp(event: KeyboardEvent): void {
this.handleKeyDown(event);
const index = this._currentActionIdx - 1;

@ -1 +1 @@
Subproject commit 8e5376bd4f1f19ae7fdbf031505489853ccecd2e
Subproject commit 7d2f5c8a7749ddac57e7aa5c936282db1e23cafe