From bf509a7fae9f3a043e7d7bd64dafafb55f3ea4e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 10 Jan 2019 12:01:55 +0100 Subject: [PATCH] MOBILE-2795 course: Scroll top on section change --- src/core/course/components/format/format.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/course/components/format/format.ts b/src/core/course/components/format/format.ts index a47d48eee..0252248f5 100644 --- a/src/core/course/components/format/format.ts +++ b/src/core/course/components/format/format.ts @@ -297,6 +297,8 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy { setTimeout(() => { this.domUtils.scrollToElementBySelector(this.content, '#core-course-module-' + this.moduleId); }, 200); + } else { + this.domUtils.scrollToTop(this.content, 0); } }