Reset scroll position to top on render.

Prevents an issue where the next article would inherit the previous
article's scroll position.
This commit is contained in:
Ben Ubois 2019-09-18 22:39:07 -07:00
parent 0b6683d073
commit 1c9117ab8e

View File

@ -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) });