linux ime

This commit is contained in:
nightwing 2013-04-30 13:29:29 +04:00
commit 6d4b91f89f

View file

@ -387,7 +387,7 @@ var TextInput = function(parentNode, host) {
inComposition = false;
var timer = setTimeout(function() {
var str = text.value.replace(/\x01/g, "");
console.log(str, c.lastValue)
// console.log(str, c.lastValue)
if (inComposition)
return
else if (str == c.lastValue)
@ -403,10 +403,8 @@ var TextInput = function(parentNode, host) {
str = str.replace(/\x01/g, "");
if (str == c.lastValue)
return "";
if (str) {
if (c.lastValue)
host.undo();
}
if (c.lastValue)
host.undo();
return str;
}
host.onCompositionEnd();