diff --git a/public/views/includes/password.html b/public/views/includes/password.html index a7f650005..6df98bbce 100644 --- a/public/views/includes/password.html +++ b/public/views/includes/password.html @@ -16,7 +16,7 @@
+ id="passwordInput" name="password" ng-model="pass.password">
diff --git a/src/js/controllers/password.js b/src/js/controllers/password.js index 36f4771ca..8c9c2b124 100644 --- a/src/js/controllers/password.js +++ b/src/js/controllers/password.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('passwordController', - function($rootScope, $scope, $timeout, profileService, notification, go, gettext) { + function($rootScope, $scope, $timeout, profileService, notification, go, gettext) { var self = this; @@ -9,18 +9,21 @@ angular.module('copayApp.controllers').controller('passwordController', self.isVerification = false; - self.close = function(cb){ + document.getElementById("passwordInput").focus(); + + self.close = function(cb) { return cb('No password given'); }; - self.set = function(isSetup, cb){ + self.set = function(isSetup, cb) { self.error = false; if (isSetup && !self.isVerification) { + document.getElementById("passwordInput").focus(); self.isVerification = true; - pass1= self.password; + pass1 = self.password; self.password = null; - $timeout(function(){ + $timeout(function() { $rootScope.$apply(); }) return; @@ -30,7 +33,7 @@ angular.module('copayApp.controllers').controller('passwordController', self.error = gettext('Passwords do not match'); self.isVerification = false; self.password = null; - pass1 =null; + pass1 = null; return; } @@ -38,4 +41,4 @@ angular.module('copayApp.controllers').controller('passwordController', return cb(null, self.password); }; - }); + }); \ No newline at end of file