Commit 604e89ec8a035d27d6baac2660a7bd10b8ad72b4
1 parent
fbe64cc5fb
Exists in
master
selecciona texto cuando abre modal
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -4,9 +4,13 @@ angular.module('focaModalEfectivo') |
4 | 4 | '$scope', |
5 | 5 | '$uibModalInstance', |
6 | 6 | 'sugerido', |
7 | - function($scope, $uibModalInstance, sugerido) { | |
7 | + '$timeout', | |
8 | + function($scope, $uibModalInstance, sugerido, $timeout) { | |
8 | 9 | if(sugerido && sugerido < 0) { |
9 | 10 | $scope.efectivo = Math.abs(sugerido); |
11 | + $timeout(function() { | |
12 | + angular.element('#importe')[0].select(); | |
13 | + }); | |
10 | 14 | } |
11 | 15 | $scope.aceptar = function(key) { |
12 | 16 | if(key === 13 && parseFloat($scope.efectivo)) { |