diff options
| author | Chia-liang Kao | 2013-12-18 00:28:35 -0800 | 
|---|---|---|
| committer | Tobias Bosch | 2013-12-18 12:28:07 -0800 | 
| commit | 3dc18037e8db8766641a4d39f0fee96077db1fcb (patch) | |
| tree | 4a9ba7c7c2666eff6e9f7eb2e6957bda8f8a271c /src/ng/directive/input.js | |
| parent | 57d50582aa7213acf77b2936f70f4c2122d206d6 (diff) | |
| download | angular.js-3dc18037e8db8766641a4d39f0fee96077db1fcb.tar.bz2 | |
fix(input): do not hold input for composition on android
Workaround for chrome for android until #2129 is ready.
Closes #5308, #5323
Diffstat (limited to 'src/ng/directive/input.js')
| -rw-r--r-- | src/ng/directive/input.js | 16 | 
1 files changed, 9 insertions, 7 deletions
| diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index fdbefe2f..6a974d9d 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -395,15 +395,17 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {    // In composition mode, users are still inputing intermediate text buffer,    // hold the listener until composition is done.    // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent -  var composing = false; +  if (!$sniffer.android) { +    var composing = false; -  element.on('compositionstart', function() { -    composing = true; -  }); +    element.on('compositionstart', function(data) { +      composing = true; +    }); -  element.on('compositionend', function() { -    composing = false; -  }); +    element.on('compositionend', function() { +      composing = false; +    }); +  }    var listener = function() {      if (composing) return; | 
