From acb406757a2bb76386a6b80b882f4d28c84d4034 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 21 May 2020 11:28:06 +0200 Subject: [PATCH] MOBILE-3401 participants: Scroll top when enable search --- src/core/user/components/participants/participants.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/user/components/participants/participants.ts b/src/core/user/components/participants/participants.ts index 23e8fb2e5..342fbea50 100644 --- a/src/core/user/components/participants/participants.ts +++ b/src/core/user/components/participants/participants.ts @@ -143,7 +143,10 @@ export class CoreUserParticipantsComponent implements OnInit { toggleSearch(): void { this.showSearchBox = !this.showSearchBox; - if (!this.showSearchBox && this.displaySearchResults) { + if (this.showSearchBox) { + // Make search bar visible. + this.domUtils.scrollToTop(this.content); + } else if (!this.showSearchBox && this.displaySearchResults) { this.clearSearch(); } }