From 8f3bf6100f09fad7c9c9db2a49b884f51cf8e3df Mon Sep 17 00:00:00 2001 From: SPT-dev Date: Thu, 2 Mar 2023 21:10:27 -0500 Subject: [PATCH] Added back scroll to top on content change --- docs/assets/js/docs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/assets/js/docs.js b/docs/assets/js/docs.js index 8fe1833..6f69884 100644 --- a/docs/assets/js/docs.js +++ b/docs/assets/js/docs.js @@ -109,6 +109,9 @@ class Docs { if (typeof this.currentRoute === "undefined" || this.currentRoute.filepath !== hashes[0]) { const route = this.findMatchingRoute(hashes[0], this.routes); + // Scroll back to top. + document.querySelector("#router-outlet").scrollTop = 0; + this.currentRoute = route; this.displayRoute(route);