enter key on the keyboard submit the spending password popup
This commit is contained in:
parent
b433120121
commit
61f6909d9a
2 changed files with 6 additions and 1 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<div class="input m20t">
|
<div class="input m20t">
|
||||||
<input type="password" placeholder="{{'Your spending password'|translate}}"
|
<input type="password" placeholder="{{'Your spending password'|translate}}"
|
||||||
id="passwordInput" name="password" ng-model="data.password" autofocus>
|
id="passwordInput" name="password" ng-model="data.password" ng-keypress="keyPress($event)" autofocus>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
||||||
|
|
@ -1727,6 +1727,11 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
return cb('No spending password given');
|
return cb('No spending password given');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.keyPress = function(event) {
|
||||||
|
if (!$scope.data.password || $scope.loading) return;
|
||||||
|
if (event.keyCode == 13) $scope.set();
|
||||||
|
}
|
||||||
|
|
||||||
$scope.set = function() {
|
$scope.set = function() {
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
$scope.error = null;
|
$scope.error = null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue