fix text input for old ie
This commit is contained in:
parent
f35418ab7d
commit
81b6e5916a
1 changed files with 18 additions and 1 deletions
|
|
@ -166,7 +166,24 @@ var TextInput = function(parentNode, host) {
|
|||
};
|
||||
|
||||
event.addCommandKeyListener(text, host.onCommandKey.bind(host));
|
||||
event.addListener(text, "input", useragent.isIE ? onPropertyChange : onTextInput);
|
||||
event.addListener(text, "input", onTextInput);
|
||||
|
||||
if (useragent.isOldIE) {
|
||||
var keytable = { 13:1, 27:1 };
|
||||
event.addListener(text, "keyup", function (e) {
|
||||
if (inCompostion && (!text.value || keytable[e.keyCode]))
|
||||
setTimeout(onCompositionEnd, 0);
|
||||
if ((text.value.charCodeAt(0)|0) < 129) {
|
||||
return;
|
||||
}
|
||||
inCompostion ? onCompositionUpdate() : onCompositionStart();
|
||||
});
|
||||
|
||||
event.addListener(text, "propertychange", function() {
|
||||
if (text.value != PLACEHOLDER)
|
||||
setTimeout(sendText, 0);
|
||||
});
|
||||
}
|
||||
|
||||
event.addListener(text, "paste", function(e) {
|
||||
// Mark that the next input text comes from past.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue