diff --git a/src/core/features/course/pages/contents/contents.ts b/src/core/features/course/pages/contents/contents.ts index 62915db57..5ac35bca3 100644 --- a/src/core/features/course/pages/contents/contents.ts +++ b/src/core/features/course/pages/contents/contents.ts @@ -353,7 +353,6 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy, CoreRefreshCon * @return Promise resolved when done. */ protected async showLoadingAndRefresh(sync = false, invalidateData = true): Promise { - // Save scroll position to restore it once done. this.updatingData = true; this.changeDetectorRef.detectChanges(); diff --git a/src/core/features/usertours/components/user-tour/user-tour.ts b/src/core/features/usertours/components/user-tour/user-tour.ts index 28d6bba73..cab608b62 100644 --- a/src/core/features/usertours/components/user-tour/user-tour.ts +++ b/src/core/features/usertours/components/user-tour/user-tour.ts @@ -183,6 +183,11 @@ export class CoreUserToursUserTourComponent implements AfterViewInit, OnDestroy * Play animation to show that the User Tour has started. */ private async playEnterAnimation(): Promise { + if (!('animate' in this.element)) { + // Not supported, don't animate. + return; + } + const animations = [ this.element.animate({ opacity: ['0', '1'] }, { duration: ANIMATION_DURATION }), this.wrapperElement.value?.animate( @@ -198,6 +203,11 @@ export class CoreUserToursUserTourComponent implements AfterViewInit, OnDestroy * Play animation to show that the User Tour has endd. */ private async playLeaveAnimation(): Promise { + if (!('animate' in this.element)) { + // Not supported, don't animate. + return; + } + const animations = [ this.element.animate({ opacity: ['1', '0'] }, { duration: ANIMATION_DURATION }), this.wrapperElement.value?.animate(