diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tpl/dokuwiki/script.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/tpl/dokuwiki/script.js b/lib/tpl/dokuwiki/script.js index 5a68e8b9c..88dae9023 100644 --- a/lib/tpl/dokuwiki/script.js +++ b/lib/tpl/dokuwiki/script.js @@ -71,10 +71,15 @@ jQuery(function(){ ); // increase sidebar length to match content (desktop mode only) - var $sidebar = jQuery('.desktop #dokuwiki__aside'); - if($sidebar.length) { + var sidebar_height = jQuery('.desktop #dokuwiki__aside').height(); + var pagetool_height = jQuery('.desktop #dokuwiki__pagetools ul:first').height(); + // pagetools div has no height; ul has a height + var content_min = Math.max(sidebar_height || 0, pagetool_height || 0); + + var content_height = jQuery('#dokuwiki__content div.page').height(); + if(content_min && content_min > content_height) { var $content = jQuery('#dokuwiki__content div.page'); - $content.css('min-height', $sidebar.height()); + $content.css('min-height', content_min); } // blur when clicked |