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

Commit 2789ccb

Browse files
jileeonNarretz
authored andcommitted
fix(input): fix composition mode in IE for Korean input
Fixes #6656 Closes #16273
1 parent 3e7a87d commit 2789ccb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/ng/directive/input.js

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

1251+
// Support: IE9+
1252+
element.on('compositionupdate', function(ev) {
1253+
// End composition when ev.data is empty string on 'compositionupdate' event.
1254+
// When the input de-focusses (e.g. by clicking away), IE triggers 'compositionupdate'
1255+
// instead of 'compositionend'.
1256+
if (isUndefined(ev.data) || ev.data === '') {
1257+
composing = false;
1258+
}
1259+
});
1260+
12511261
element.on('compositionend', function() {
12521262
composing = false;
12531263
listener();

0 commit comments

Comments
 (0)