From 45dd4d61b8633fe0856764a2245a29cc1dbcc6b8 Mon Sep 17 00:00:00 2001 From: Jamie Loberman Date: Wed, 8 Jul 2015 11:51:22 -0700 Subject: [PATCH] Only scroll entering nav view, not the one you're leaving. If you had already been to a page previously, and then navigated away from it, there was a flash of it's previous scroll position that showed. This ensures that only the view that is being animated in to view, is scrolled to the correct position, and the one leaving the view is left alone. --- components/ionView/ionView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ionView/ionView.js b/components/ionView/ionView.js index 07a0135..0466a7a 100644 --- a/components/ionView/ionView.js +++ b/components/ionView/ionView.js @@ -5,7 +5,7 @@ Template.ionView.rendered = function () { // Reset our scroll position var routePath = Router.current().route.path(Router.current().params); if(IonScrollPositions[routePath]) { - $('.overflow-scroll').scrollTop(IonScrollPositions[routePath]); + $('.overflow-scroll').not('.nav-view-leaving .overflow-scroll').scrollTop(IonScrollPositions[routePath]); delete IonScrollPositions[routePath]; } };