Merge pull request #1391 from albertgasset/MOBILE-2452
MOBILE-2452 course: Scroll back after completing an activitymain
commit
53b0233e28
|
@ -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;
|
||||
|
||||
|
@ -304,7 +304,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