Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
9094617d
Unverified
Commit
9094617d
authored
5 years ago
by
Adam Butterworth
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Prevent scrolling in chromeless view when iframed into learning mfe (#23291)
TNL-7094
parent
440ef56f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/templates/courseware/courseware-chromeless.html
+9
-1
9 additions, 1 deletion
lms/templates/courseware/courseware-chromeless.html
with
9 additions
and
1 deletion
lms/templates/courseware/courseware-chromeless.html
+
9
−
1
View file @
9094617d
...
...
@@ -86,7 +86,7 @@ ${HTML(fragment.foot_html())}
%
else:
data-enable-completion-on-view-service=
"false"
\
%
endif
style=
"display: block; width: auto;"
style=
"display: block; width: auto;
margin: 0;
"
>
<main
id=
"main"
tabindex=
"-1"
aria-label=
"Content"
>
${HTML(fragment.body_html())}
...
...
@@ -139,6 +139,14 @@ ${HTML(fragment.foot_html())}
lastHeight
=
newHeight
;
lastWidth
=
newWidth
;
// Within the learning microfrontend the iframe resizes to match the
// height of this document and it should never scroll. It does scroll
// ocassionally when javascript is used to focus elements on the page
// before the parent iframe has been resized to match the content
// height. This window.scrollTo is an attempt to keep the content at the
// top of the page. See TNL-7094
window
.
scrollTo
(
0
,
0
);
}
// Create an observer instance linked to the callback function
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment