Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 707909f2 authored by Scott Main's avatar Scott Main Committed by Android (Google) Code Review
Browse files

Merge "docs: don't allow setting the sidenav fixed if the doc body is shorter...

Merge "docs: don't allow setting the sidenav fixed if the doc body is shorter than the sidenav. Scrolling won't be possible in this case anyway, but this change fixes a glitch that happens on OSX Lion because it will allow scrolling anyway for the overscroll bounce." into jb-mr1-dev
parents 6a6c1121 b8d06a55
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -358,7 +358,13 @@ false; // navigate across topic boundaries only in design docs
    var searchResultHeight = $('#searchResults').is(":visible") ? 
                             $('#searchResults').outerHeight() : 0;
    var totalHeaderHeight = headerHeight + subheaderHeight + searchResultHeight;
    // we set the navbar fixed when the scroll position is beyond the height of the site header...
    var navBarShouldBeFixed = scrollTop > totalHeaderHeight;
    // ... except if the document content is shorter than the sidenav height.
    // (this is necessary to avoid crazy behavior on OSX Lion due to overscroll bouncing)
    if ($("#doc-col").height() < $("#side-nav").height()) {
      navBarShouldBeFixed = false;
    }
   
    var scrollLeft = $(window).scrollLeft();
    // When the sidenav is fixed and user scrolls horizontally, reposition the sidenav to match