diff --git a/src/app/components/dialog-save-session/dialog-save-session.component.html b/src/app/components/dialog-save-session/dialog-save-session.component.html index 5c19a5bc6c607f1367d8cc2f3a6363ddc7625bc3..f207e5b27df91dbe679139a0f09ea4b2640369cb 100644 --- a/src/app/components/dialog-save-session/dialog-save-session.component.html +++ b/src/app/components/dialog-save-session/dialog-save-session.component.html @@ -16,7 +16,7 @@ <mat-form-field> <input matInput required [placeholder]="uitextFilenameInput" [(ngModel)]="fileName" - name="filename" #filename="ngModel"> + name="filename" #filename="ngModel" (keydown.enter)="onEnterPressed($event)"> </mat-form-field> </div> diff --git a/src/app/components/dialog-save-session/dialog-save-session.component.ts b/src/app/components/dialog-save-session/dialog-save-session.component.ts index 032ed2c65e56e026db473bc9eaca0eea6a3349a1..617557dcc9deb2849ba0a1bf06d77cf9c9490bf3 100644 --- a/src/app/components/dialog-save-session/dialog-save-session.component.ts +++ b/src/app/components/dialog-save-session/dialog-save-session.component.ts @@ -71,4 +71,9 @@ export class DialogSaveSessionComponent { public get uitextFilenameInput() { return this.intlService.localizeText("INFO_DIALOG_SAVE_SESSION_FILENAME"); } + + public onEnterPressed(event) { + this.saveSession(); + return false; // stops event propagation + } }