Skip to content

Commit

Permalink
MDL-47353 gradereport_grader: Fix header offset logic for floating he…
Browse files Browse the repository at this point in the history
…aders

This is necessary for themes with non-fixed navbars to work with the
grader report, otherwise headers will be hidden.

This issue is a part of the MDL-46658 Task.
This issue is a part of the MDL-25544 Epic.
  • Loading branch information
Dave Cooper authored and andrewnicols committed Oct 3, 2014
1 parent 6821f73 commit 3d8ef7c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,13 @@ FloatingHeaders.prototype = {
if (header) {
if (header.getComputedStyle('position') === 'fixed') {
this.pageHeaderHeight = header.get(OFFSETHEIGHT);
} else {
var navbar = Y.one('.navbar');

if (navbar) {
// If the navbar exists and isn't fixed, we need to offset the page header to accommodate for it.
this.pageHeaderHeight = navbar.get(OFFSETHEIGHT);
}
}
}
},
Expand Down
Loading

0 comments on commit 3d8ef7c

Please sign in to comment.