From a592da33bbf0adbe93d7d47fd016a8af462ed677 Mon Sep 17 00:00:00 2001 From: rnitta Date: Sat, 19 Oct 2019 17:07:41 +0900 Subject: [PATCH] fix the behavior of sticky header (#1070) --- src/theme/book.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }); })();