aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hovorka <[email protected]>2020-04-26 23:10:47 -0600
committerAdam Hovorka <[email protected]>2020-04-26 23:10:47 -0600
commit1ae62b3301ba0967b1eb3a73e307b486b4629be8 (patch)
tree7980e817cf98b66f4f9b8e5ae20f5b632edd36aa
parent76cba3892256fb9130094e34b367e432e18d1769 (diff)
Fix weird scrolling issue on some browsers
-rw-r--r--main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.js b/main.js
index 6eccc24..9e27824 100644
--- a/main.js
+++ b/main.js
@@ -276,7 +276,7 @@ window.addEventListener("hashchange", () => {
if (newid == oldid) {
const newoff = document.getElementById("main").lastChild.offsetTop;
document.documentElement.scrollTop = newoff - (oldoff - oldscroll)
- }
+ } else document.documentElement.scrollTop = oldscroll;
state.path = newpath;