Set correct focus for selfhosters in setup wizard

This commit is contained in:
Johannes Zellner
2016-07-28 16:22:20 +02:00
parent cd896a4422
commit 7862fbd7ee
2 changed files with 8 additions and 3 deletions

View File

@@ -180,8 +180,13 @@ app.controller('StepController', ['$scope', '$route', '$location', 'Wizard', fun
};
$scope.$on('$viewContentLoaded', function () {
$('a[autofocus]').focus();
$('input[autofocus]').focus();
if ($location.path() === '/step2') {
if (Wizard.requireEmail) $('#inputEmail').focus();
else $('#inputDisplayName').focus();
} else {
$('a[autofocus]').focus();
$('input[autofocus]').focus();
}
});
$scope.showCustomAvatarSelector = function () {