1
0
mirror of https://github.com/bitwarden/web synced 2025-12-10 05:13:40 +00:00

org create desc and page scroll on state changes

This commit is contained in:
Kyle Spearrin
2017-04-07 12:39:52 -04:00
parent 71adf31f7b
commit eaba45369b
2 changed files with 8 additions and 0 deletions

View File

@@ -242,6 +242,10 @@ angular
});
})
.run(function ($rootScope, authService, $state) {
$rootScope.$on('$stateChangeSuccess', function () {
$('html, body').animate({ scrollTop: 0 }, 200);
});
$rootScope.$on('$stateChangeStart', function (event, toState, toParams) {
if (!toState.data || !toState.data.authorize) {
if (toState.data && toState.data.skipAuthorize) {