fix copy and paste issue in Chrome and Safari
This commit is contained in:
parent
b6c2dace95
commit
b6da535e20
1 changed files with 2 additions and 0 deletions
|
|
@ -71,6 +71,7 @@ var TextInput = function(parentNode, host) {
|
||||||
text.value = host.getCopyText();
|
text.value = host.getCopyText();
|
||||||
text.select();
|
text.select();
|
||||||
copied = true;
|
copied = true;
|
||||||
|
setTimeout(sendText, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
var onCut = function() {
|
var onCut = function() {
|
||||||
|
|
@ -78,6 +79,7 @@ var TextInput = function(parentNode, host) {
|
||||||
text.value = host.getCopyText();
|
text.value = host.getCopyText();
|
||||||
host.onCut();
|
host.onCut();
|
||||||
text.select();
|
text.select();
|
||||||
|
setTimeout(sendText, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
event.addListener(text, "keypress", onTextInput);
|
event.addListener(text, "keypress", onTextInput);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue