Handle non-composition input when IME is active

This commit is contained in:
Daniel Imms
2016-07-12 20:51:55 -07:00
parent cab79c473f
commit 8faea59e31
+21
View File
@@ -239,6 +239,22 @@
}
}
CompositionHelper.prototype.handleAnyTextareaChanges = function() {
var oldValue = this.textarea.value;
var self = this;
setTimeout(function() {
// Ensure no composition has started since the timeout
if (!self.isComposing) {
var newValue = self.textarea.value;
var diff = newValue.replace(oldValue, '');
if (diff.length > 0) {
self.terminal.handler(diff);
}
}
}, 0);
}
/**
* Updates the composition view's position.
*/
@@ -2619,6 +2635,11 @@
}
}
if (ev.keyCode === 229) {
this.compositionHelper.handleAnyTextareaChanges();
return;
}
var self = this;
var result = this.evaluateKeyEscapeSequence(ev);