diff --git a/ignite-html-router.js b/ignite-html-router.js index 5f02754..5b9d473 100644 --- a/ignite-html-router.js +++ b/ignite-html-router.js @@ -46,6 +46,9 @@ IgniteTemplate.prototype.route = function (routes, showCallback = null, hideCall //Invoke the callback if the route matched. if (routeMatches) { + //Replace the element so that the scroll position resets, if possible. + this.element.parentElement.parentElement.replaceChild(this.element.parentElement, this.element.parentElement); + //Show the route element. this.element.style.removeProperty("display");