Added code to reset the element on route change so that if there is a scroll bar it also gets reset.
This commit is contained in:
1 parent
862b01968e
commit
c8c8ba67c5
1 file changed
+3
@@ -46,6 +46,9 @@ IgniteTemplate.prototype.route = function (routes, showCallback = null, hideCall
|
|||||||
|
|
||||||
//Invoke the callback if the route matched.
|
//Invoke the callback if the route matched.
|
||||||
if (routeMatches) {
|
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.
|
//Show the route element.
|
||||||
this.element.style.removeProperty("display");
|
this.element.style.removeProperty("display");
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user