From f3d23b1ab5ea4e30072c0ca1abef3418d1d8dfe8 Mon Sep 17 00:00:00 2001 From: arzynik Date: Thu, 6 Mar 2014 19:03:59 -0800 Subject: [PATCH] fixes #2522 --- www/assets/js/app.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/www/assets/js/app.js b/www/assets/js/app.js index 7cc128c2b..2f1d145fd 100644 --- a/www/assets/js/app.js +++ b/www/assets/js/app.js @@ -412,7 +412,7 @@ NGApp.controller('AppController', function ($scope, $route, $http, $routeParams, App.parallax.bg = null; - App.scrollTop($rootScope.scrollTop); + App.setTop(); $rootScope.scrollTop = 0; }); @@ -489,6 +489,15 @@ App.toggleMenu = function() { /** * scroll to the top of the page */ +App.setTop = function() { + $('html, body, .snap-content-inner').scrollTop(0); + + $('#ng-view').css('-webkit-transform','translate3d(0,0,0)'); + setTimeout(function() { + $('#ng-view').css('-webkit-transform',''); + },1000); + +}; App.scrollTop = function(top) { setTimeout(function() { $('html, body, .snap-content-inner').animate({scrollTop: top || 0}, 10, $.easing.easeInOutQuart ? 'easeInOutQuart' : null);