From 1c9117ab8e9d2702c7fa259993c7d1ef66da5fa1 Mon Sep 17 00:00:00 2001 From: Ben Ubois Date: Wed, 18 Sep 2019 22:39:07 -0700 Subject: [PATCH] Reset scroll position to top on render. Prevents an issue where the next article would inherit the previous article's scroll position. --- Shared/Article Rendering/page.html | 1 + 1 file changed, 1 insertion(+) diff --git a/Shared/Article Rendering/page.html b/Shared/Article Rendering/page.html index af99dbbaa..b25dc0312 100644 --- a/Shared/Article Rendering/page.html +++ b/Shared/Article Rendering/page.html @@ -182,6 +182,7 @@ function render(data) { document.body.innerHTML = data.body; + window.scrollTo(0, 0); var anchors = document.getElementsByTagName("a"); for (var i = 0; i < anchors.length; i++) { anchors[i].addEventListener("mouseenter", function() { mouseDidEnterLink(this) });