From d2099291338076782bef3bc9950f4b72f9dfcc3c Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 21 May 2014 15:28:38 -0400 Subject: [PATCH] Make sure the scroll is at the top of the page on every route change --- static/js/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 4a7e68433..2bcc8feea 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -4815,8 +4815,8 @@ quayApp.directive('ngVisible', function () { }; }); -quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanService', '$http', '$timeout', 'CookieService', - function($location, $rootScope, Restangular, UserService, PlanService, $http, $timeout, CookieService) { +quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanService', '$http', '$timeout', 'CookieService', '$anchorScroll', + function($location, $rootScope, Restangular, UserService, PlanService, $http, $timeout, CookieService, $anchorScroll) { // Handle session security. Restangular.setDefaultRequestParams(['post', 'put', 'remove', 'delete'], {'_csrf_token': window.__token || ''}); @@ -4923,6 +4923,7 @@ quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', 'PlanServi } $rootScope.fixFooter = !!current.$$route.fixFooter; + $anchorScroll(); }); $rootScope.$on('$viewContentLoaded', function(event, current) {