Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit b59f62d

Browse files
committed
fix(input[text]): composing function dosen't works properly in IE
1 parent b86876c commit b59f62d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ng/directive/input.js

+6
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,12 @@ function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {
12481248
composing = true;
12491249
});
12501250

1251+
element.on('compositionupdate', function(ev) {
1252+
// To end composition when ev.data is empty string on 'compositionupdate' event.
1253+
// When the input has blurred, IE only triggers 'compositionupdate' event instead of 'compositionend'.
1254+
if (ev.data === '') composing = false;
1255+
});
1256+
12511257
element.on('compositionend', function() {
12521258
composing = false;
12531259
listener();

0 commit comments

Comments
 (0)