Skip to content

Commit

Permalink
fix(input): do not hold input for comopsition on android
Browse files Browse the repository at this point in the history
Workaround for chrome for android until angular#2129 is ready.

Closes angular#5308, angular#5323
  • Loading branch information
clkao committed Dec 18, 2013
1 parent c4eeeba commit 8825b8c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/ng/directive/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8825b8c

Please sign in to comment.