MOBILE-3833 course: Fix conflict with automatic scrolls
parent
fff702edab
commit
785d8390e8
|
@ -509,12 +509,14 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
|||
const moduleIdToScroll = this.moduleId && previousValue === undefined ? this.moduleId : moduleId;
|
||||
if (moduleIdToScroll) {
|
||||
this.scrollToModule(moduleIdToScroll);
|
||||
} else {
|
||||
}
|
||||
|
||||
if (!previousValue || previousValue.id !== newSection.id) {
|
||||
// First load or section changed.
|
||||
if (!moduleIdToScroll) {
|
||||
this.content.scrollToTop(0);
|
||||
}
|
||||
|
||||
if (!previousValue || previousValue.id != newSection.id) {
|
||||
// First load or section changed, add log in Moodle.
|
||||
CoreUtils.ignoreErrors(
|
||||
CoreCourse.logView(this.course.id, newSection.section, undefined, this.course.fullname),
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue