From bd6fc9adfd77df8686469422a5155e300054c6cf Mon Sep 17 00:00:00 2001 From: Gwenillia <55385809+Gwenillia@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:56:16 +0200 Subject: [PATCH] JI-6555 prevent default scroll and lti scroll (#159) --- src/scripts/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/app.js b/src/scripts/app.js index 5d0fea1..754c1a5 100644 --- a/src/scripts/app.js +++ b/src/scripts/app.js @@ -484,7 +484,7 @@ export default class InteractiveBook extends H5P.EventDispatcher { const container = this.pageContent.container; container.scrollBy(0, -container.scrollHeight); } - else { + else if (H5PIntegration.context !== 'lti') { this.statusBarHeader.wrapper.scrollIntoView(true); } }); @@ -1013,7 +1013,7 @@ export default class InteractiveBook extends H5P.EventDispatcher { this.setActivityStarted(); // Focus header progress bar when cover is removed - this.statusBarHeader.progressBar.progress.focus(); + this.statusBarHeader.progressBar.progress.focus({ preventScroll: true }); }); } else {