diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index a6a8d05f..03820794 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -178,7 +178,12 @@ var TextInput = function(parentNode, host) { cut = true; text.value = data; text.select(); - setTimeout(function(){ host.onCut() }); + setTimeout(function(){ + cut = false; + resetValue(); + resetSelection(); + host.onCut(); + }); } }; @@ -203,7 +208,12 @@ var TextInput = function(parentNode, host) { copied = true; text.value = data; text.select(); - setTimeout(function(){ host.onCopy() }); + setTimeout(function(){ + copied = false; + resetValue(); + resetSelection(); + host.onCopy(); + }); }