From 0f2960e2f4ee665238619aae77ca71e1ead8354e Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Thu, 10 Aug 2023 21:30:48 -0700 Subject: [PATCH] Fix bug where in-memory pages are served midscroll --- script.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script.js b/script.js index b52754e..ef88dec 100644 --- a/script.js +++ b/script.js @@ -302,6 +302,9 @@ function route(href) { else { history.pushState({}, '', url); showPage(url.pathname); + // Reset scroll to simulate new page load when an in-memory page is served + // This does not affect the back/forward button + scroll(0, 0); } } -- 2.47.3