Commit 52710a5 1 parent eabf6f6 commit 52710a5 Copy full SHA for 52710a5
File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -318,12 +318,15 @@ $(document).ready(function () {
318
318
} , 0 ) ;
319
319
} ) ;
320
320
321
- // Initialize Sidebar & TOC Height.
322
- updateSidebarHeight ( document . body . clientHeight - NexT . utils . getSidebarSchemePadding ( ) ) ;
323
-
324
321
// Initialize Sidebar & TOC Width.
325
322
var scrollbarWidth = NexT . utils . getScrollbarWidth ( ) ;
326
- $ ( '.site-overview, .post-toc' ) . css ( 'width' , 'calc(100% + ' + scrollbarWidth + 'px)' ) ;
323
+ if ( $ ( '.sidebar-panel' ) . height ( ) > ( document . body . clientHeight - NexT . utils . getSidebarSchemePadding ( ) ) ) {
324
+ $ ( '.site-overview' ) . css ( 'width' , 'calc(100% + ' + scrollbarWidth + 'px)' ) ;
325
+ }
326
+ $ ( '.post-toc' ) . css ( 'width' , 'calc(100% + ' + scrollbarWidth + 'px)' ) ;
327
+
328
+ // Initialize Sidebar & TOC Height.
329
+ updateSidebarHeight ( document . body . clientHeight - NexT . utils . getSidebarSchemePadding ( ) ) ;
327
330
}
328
331
329
332
function updateSidebarHeight ( height ) {
You can’t perform that action at this time.
0 commit comments