diff --git a/src/app/components/shared/questionwall/question-wall/question-wall.component.ts b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts index 689228e3584950cf52e7437d441d7071d36f6179..8148af8a71b5aeea0174ddd555730624f52af07c 100644 --- a/src/app/components/shared/questionwall/question-wall/question-wall.component.ts +++ b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts @@ -34,7 +34,7 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy { commentsCountQuestions = 0; commentsCountUsers = 0; unreadComments = 0; - focusIncommingComments = false; + focusIncommingComments = true; timeUpdateInterval; keySupport: QuestionWallKeyEventSupport; hasFilter = false; @@ -319,7 +319,13 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy { this.filterFunction = filter; this.commentsFilter = this.commentsFilteredByTime.filter(this.filterFunction); this.hasFilter = true; - setTimeout(() => this.focusFirstComment(), 0); + setTimeout(() => { + if (this.commentsFilter.length <= 0) { + this.commentFocus = null; + } else { + this.focusFirstComment(); + } + }, 0); this.updateCommentsCountOverview(); }