GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 0e71aa44 authored by André Holger Hanke's avatar André Holger Hanke

Add autofocus to inputfield when asking a question

parent be7cef2f
Pipeline #47082 passed with stages
in 12 minutes and 11 seconds
......@@ -27,7 +27,7 @@
(blur)="eventService.makeFocusOnInputFalse()"
matInput #commentBody matTextareaAutosize
matAutosizeMinRows=5 matAutosizeMaxRows=10 maxlength="250"
[formControl]="bodyForm" aria-labelledby="ask-question-description">
[formControl]="bodyForm" aria-labelledby="ask-question-description" autofocus id="answer-input">
</textarea>
<mat-placeholder class="placeholder">
{{ 'comment-page.enter-comment' | translate }}
......
......@@ -38,6 +38,9 @@ export class CreateCommentComponent implements OnInit {
ngOnInit() {
this.translateService.use(localStorage.getItem('currentLang'));
setTimeout(() => {
document.getElementById('answer-input').focus();
}, 0);
}
onNoClick(): void {
......
......@@ -271,7 +271,8 @@ export class CommentListComponent implements OnInit, OnDestroy {
const dialogRef = this.dialog.open(CreateCommentComponent, {
width: '900px',
maxWidth: 'calc( 100% - 50px )',
maxHeight: 'calc( 100vh - 50px )'
maxHeight: 'calc( 100vh - 50px )',
autoFocus: false
});
dialogRef.componentInstance.user = this.user;
dialogRef.componentInstance.roomId = this.roomId;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment