Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lms/templates/courseware/courseware-chromeless.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@
// the href attribute is an id or name, the page will scroll the id or name.
$('a').on("click", function(event){
if ($(this).attr('href')[0] === '#') {
// Anchors that operate a widget (like accordions, tabs, dropdowns)
// point at the region they control rather than navigating to it, and
// handle the click themselves. Scrolling that region to the top of
// the page jumps the surrounding learning MFE viewport every time the
// widget is toggled, so we can leave these anchors alone.
if (this.hasAttribute('aria-controls') || this.hasAttribute('data-toggle')) {
return;
}
var targetId = $(this).attr('href');
// Checks if the href attribute is auto scrolling video transcripts.
// The scroll behavior for transcript scrolling requires the viewport
Expand Down
Loading