MOBILE-2452 course: Scroll back after completing an activity
parent
ef20b3c3dd
commit
1c443c8352
|
@ -17,7 +17,7 @@
|
|||
<core-context-menu-item [priority]="1800" [content]="'core.course.coursesummary' | translate" (action)="openCourseSummary()" iconAction="fa-graduation-cap"></core-context-menu-item>
|
||||
</core-context-menu>
|
||||
</core-navbar-buttons>
|
||||
<ion-content>
|
||||
<ion-content #courseSectionContent>
|
||||
<ion-refresher [enabled]="dataLoaded && displayRefresher" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
|
|
@ -37,7 +37,7 @@ import { CoreTabsComponent } from '@components/tabs/tabs';
|
|||
templateUrl: 'section.html',
|
||||
})
|
||||
export class CoreCourseSectionPage implements OnDestroy {
|
||||
@ViewChild(Content) content: Content;
|
||||
@ViewChild('courseSectionContent') content: Content;
|
||||
@ViewChild(CoreCourseFormatComponent) formatComponent: CoreCourseFormatComponent;
|
||||
@ViewChild(CoreTabsComponent) tabsComponent: CoreTabsComponent;
|
||||
|
||||
|
@ -303,7 +303,11 @@ export class CoreCourseSectionPage implements OnDestroy {
|
|||
|
||||
this.loadData().finally(() => {
|
||||
this.dataLoaded = true;
|
||||
this.content.scrollTo(scrollLeft, scrollTop);
|
||||
|
||||
// Wait for new content height to be calculated and scroll without animation.
|
||||
setTimeout(() => {
|
||||
this.content.scrollTo(scrollLeft, scrollTop, 0);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue