From 771a4ca4410801a67b6ef1cef098798d41f7ec26 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Tue, 6 Feb 2024 20:40:13 +0200 Subject: [PATCH] RED-6960 - Enter should confirm a modal window by default --- .../resize-annotation-dialog.component.ts | 4 ++++ .../app/modules/shared/components/select/select.component.ts | 5 ----- .../dialogs/download-dialog/download-dialog.component.ts | 4 ---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/docu-mine/resize-annotation-dialog/resize-annotation-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/docu-mine/resize-annotation-dialog/resize-annotation-dialog.component.ts index b8b6e015f..d290574d2 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/docu-mine/resize-annotation-dialog/resize-annotation-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/docu-mine/resize-annotation-dialog/resize-annotation-dialog.component.ts @@ -21,6 +21,10 @@ export class ResizeAnnotationDialogComponent extends IqserDialogComponent< comment: [null], }); + constructor() { + super(); + } + save() { const formValue = this.form.getRawValue(); diff --git a/apps/red-ui/src/app/modules/shared/components/select/select.component.ts b/apps/red-ui/src/app/modules/shared/components/select/select.component.ts index e70a75335..feef78bad 100644 --- a/apps/red-ui/src/app/modules/shared/components/select/select.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/select/select.component.ts @@ -90,11 +90,6 @@ export class SelectComponent implements AfterViewInit, ControlValueAccessor, OnC } this._propagateChange([...new Set(this._value)]); - - setTimeout(() => { - const saveButton = document.getElementById('saveButton') as HTMLElement; - saveButton?.focus(); - }, 50); } } diff --git a/apps/red-ui/src/app/modules/shared/dialogs/download-dialog/download-dialog.component.ts b/apps/red-ui/src/app/modules/shared/dialogs/download-dialog/download-dialog.component.ts index c341e2010..169c55d91 100644 --- a/apps/red-ui/src/app/modules/shared/dialogs/download-dialog/download-dialog.component.ts +++ b/apps/red-ui/src/app/modules/shared/dialogs/download-dialog/download-dialog.component.ts @@ -115,10 +115,6 @@ export class DownloadDialogComponent extends IqserDialogComponent reportTemplate.templateId; override close() {