called 'stopImmediatePropagation' method to be sure event will not be triggered more times

This commit is contained in:
Valentin Mihai 2022-03-03 22:02:55 +02:00
parent 2cfe09a070
commit 0157507f66

View File

@ -70,6 +70,7 @@ export abstract class BaseDialogComponent extends AutoUnsubscribe implements OnI
@HostListener('window:keydown.Enter', ['$event'])
onEnter(event: KeyboardEvent): void {
event?.stopImmediatePropagation();
const node = (event.target as IqserEventTarget).localName;
if (this.valid && !this.disabled && this.changed && node !== 'textarea') {
this.save();