diff --git a/src/theme/book.js b/src/theme/book.js index dbeed295..1a419adb 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -602,6 +602,6 @@ function playpen_text(playpen) { menu.classList.remove('bordered'); } - previousScrollTop = document.scrollingElement.scrollTop; + previousScrollTop = Math.max(document.scrollingElement.scrollTop, 0); }, { passive: true }); })();