Added back scroll to top on content change
This commit is contained in:
parent
04b7e5b638
commit
7736702e8d
@ -109,6 +109,9 @@ class Docs {
|
|||||||
if (typeof this.currentRoute === "undefined" || this.currentRoute.filepath !== hashes[0]) {
|
if (typeof this.currentRoute === "undefined" || this.currentRoute.filepath !== hashes[0]) {
|
||||||
const route = this.findMatchingRoute(hashes[0], this.routes);
|
const route = this.findMatchingRoute(hashes[0], this.routes);
|
||||||
|
|
||||||
|
// Scroll back to top.
|
||||||
|
document.querySelector("#router-outlet").scrollTop = 0;
|
||||||
|
|
||||||
this.currentRoute = route;
|
this.currentRoute = route;
|
||||||
this.displayRoute(route);
|
this.displayRoute(route);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user