fix(input): fix composition mode in IE for Korean input

Fixes #6656
Closes #16273
This commit is contained in:
Jae Ik Lee
2017-12-26 03:11:51 +09:00
committed by Martin Staffa
parent 3e7a87d7d1
commit 2789ccbcf9
+10
View File
@@ -1248,6 +1248,16 @@ function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {
composing = true;
});
// Support: IE9+
element.on('compositionupdate', function(ev) {
// End composition when ev.data is empty string on 'compositionupdate' event.
// When the input de-focusses (e.g. by clicking away), IE triggers 'compositionupdate'
// instead of 'compositionend'.
if (isUndefined(ev.data) || ev.data === '') {
composing = false;
}
});
element.on('compositionend', function() {
composing = false;
listener();