MOBILE-3401 participants: Scroll top when enable search

main
Dani Palou 2020-05-21 11:28:06 +02:00
parent 9057b62333
commit acb406757a
1 changed files with 4 additions and 1 deletions

View File

@ -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();
}
}