setTimeout passes the elapsed time as argument
This commit is contained in:
parent
3bf7247366
commit
0259c731f8
1 changed files with 10 additions and 3 deletions
|
|
@ -111,7 +111,10 @@ var TextInput = function(parentNode, host) {
|
||||||
else
|
else
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
text.select();
|
text.select();
|
||||||
setTimeout(sendText, 0);
|
setTimeout(function () {
|
||||||
|
sendText();
|
||||||
|
}, 0);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var onCut = function(e) {
|
var onCut = function(e) {
|
||||||
|
|
@ -123,7 +126,10 @@ var TextInput = function(parentNode, host) {
|
||||||
} else
|
} else
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
text.select();
|
text.select();
|
||||||
setTimeout(sendText, 0);
|
setTimeout(function () {
|
||||||
|
sendText();
|
||||||
|
}, 0);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
event.addCommandKeyListener(text, host.onCommandKey.bind(host));
|
event.addCommandKeyListener(text, host.onCommandKey.bind(host));
|
||||||
|
|
@ -131,7 +137,8 @@ var TextInput = function(parentNode, host) {
|
||||||
if (useragent.isIE) {
|
if (useragent.isIE) {
|
||||||
var keytable = { 13:1, 27:1 };
|
var keytable = { 13:1, 27:1 };
|
||||||
event.addListener(text, "keyup", function (e) {
|
event.addListener(text, "keyup", function (e) {
|
||||||
if (inCompostion && (!text.value || keytable[e.keyCode])) setTimeout(onCompositionEnd, 0);
|
if (inCompostion && (!text.value || keytable[e.keyCode]))
|
||||||
|
setTimeout(onCompositionEnd, 0);
|
||||||
if ((text.value.charCodeAt(0)|0) < 129) {
|
if ((text.value.charCodeAt(0)|0) < 129) {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue