Skip to content

Commit 8825b8c

Browse files
committed
fix(input): do not hold input for comopsition on android
Workaround for chrome for android until angular#2129 is ready. Closes angular#5308, angular#5323
1 parent c4eeeba commit 8825b8c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/ng/directive/input.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -395,15 +395,17 @@ function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
395395
// In composition mode, users are still inputing intermediate text buffer,
396396
// hold the listener until composition is done.
397397
// More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent
398-
var composing = false;
398+
if (!$sniffer.android) {
399+
var composing = false;
399400

400-
element.on('compositionstart', function() {
401-
composing = true;
402-
});
401+
element.on('compositionstart', function(data) {
402+
composing = true;
403+
});
403404

404-
element.on('compositionend', function() {
405-
composing = false;
406-
});
405+
element.on('compositionend', function() {
406+
composing = false;
407+
});
408+
}
407409

408410
var listener = function() {
409411
if (composing) return;

0 commit comments

Comments
 (0)