]> BookStack Code Mirror - bookstack/commitdiff
Fixed sidebar rubber-banding when content is expanded
authorDan Brown <redacted>
Sat, 22 Sep 2018 14:52:09 +0000 (15:52 +0100)
committerDan Brown <redacted>
Sat, 22 Sep 2018 14:52:09 +0000 (15:52 +0100)
Hopefully for #905
Ideally layout needs to be re-thought

resources/assets/js/components/page-display.js

index 260600d3420b19c00652d0e5588d1516b9cf1e4f..3fd8fb8efe7b04f96067d7058fbb7baa561afb8b 100644 (file)
@@ -128,7 +128,7 @@ class PageDisplay {
         let $bookTreeParent = $sidebar.parent();
 
         // Check the page is scrollable and the content is taller than the tree
-        let pageScrollable = ($(document).height() > $window.height()) && ($sidebar.height() < $('.page-content').height());
+        let pageScrollable = ($(document).height() > ($window.height() + 40)) && ($sidebar.height() < $('.page-content').height());
 
         // Get current tree's width and header height
         let headerHeight = $("#header").height() + $(".toolbar").height();