Skip to content

Commit b2ddbd2

Browse files
committed
Fix scroll issue
1 parent 2fdccb4 commit b2ddbd2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

theme/toc.js.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ class MDBookSidebarScrollbox extends HTMLElement {
7070
}, { passive: true });
7171
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
7272
sessionStorage.removeItem('sidebar-scroll');
73-
if (sidebarScrollTop) {
73+
// MOD: Always do this as otherwise it breaks the content scrolling
74+
if (true || sidebarScrollTop) {
7475
// preserve sidebar scroll position when navigating via links within sidebar
7576
this.scrollTop = sidebarScrollTop;
7677
} else {

0 commit comments

Comments
 (0)