diff options
| author | Igor Minar | 2013-12-31 00:40:53 -0800 | 
|---|---|---|
| committer | Igor Minar | 2013-12-31 00:41:15 -0800 | 
| commit | a80049fd0ac858eeeb645a4209cb2a661d0b4c33 (patch) | |
| tree | fbee42cb38adcd4d7394ac7a74ed36dd46ad7555 /src | |
| parent | d158dd131e3291e0da04863c3c9ed2ac5bdd19c1 (diff) | |
| download | angular.js-a80049fd0ac858eeeb645a4209cb2a661d0b4c33.tar.bz2 | |
fix(input): use apply on change event only when one isn't already in progress
Closes #5293
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/directive/input.js | 8 | 
1 files changed, 2 insertions, 6 deletions
| diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index c280b7c2..00c1c821 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -407,7 +407,7 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {      });    } -  var listener = function(ev) { +  var listener = function() {      if (composing) return;      var value = element.val(); @@ -419,11 +419,7 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {      }      if (ctrl.$viewValue !== value) { -      // If an event was performed natively, jQuery sets the isTrigger property. -      // When triggering event manually, the field is not present. Manually -      // triggered events are performed synchronously which causes the "$digest -      // already in progress" error. -      if (ev && ev.isTrigger) { +      if (scope.$$phase) {          ctrl.$setViewValue(value);        } else {          scope.$apply(function() { | 
