From 67a4a3329cb0fa640fed3cd0a8002ed2d148db4e Mon Sep 17 00:00:00 2001 From: DanyaPostfactum Date: Sun, 4 Nov 2012 18:54:10 +1100 Subject: [PATCH] reset text on old way cut/copy --- lib/ace/keyboard/textinput.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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(); + }); }