fix #906 can't input chinese in ie9

This commit is contained in:
nightwing 2013-03-28 21:24:52 +04:00
commit bf34500927

View file

@ -380,7 +380,13 @@ var TextInput = function(parentNode, host) {
var onCompositionEnd = function(e) {
var c = inComposition;
inComposition = false;
var timer = setTimeout(function() {
var str = text.value.replace(/\x01/g, "");
if (!inComposition && str == c.lastValue)
resetValue();
});
inputHandler = function compositionInputHandler(str) {
clearTimeout(timer);
str = str.replace(/\x01/g, "");
if (str == c.lastValue)
return "";