From b6da535e2061e73f76c1028330ed9aa3411280d7 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 20 Oct 2010 11:24:54 +0200 Subject: [PATCH] fix copy and paste issue in Chrome and Safari --- src/ace/TextInput.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ace/TextInput.js b/src/ace/TextInput.js index ae015169..b29bac8c 100644 --- a/src/ace/TextInput.js +++ b/src/ace/TextInput.js @@ -71,6 +71,7 @@ var TextInput = function(parentNode, host) { text.value = host.getCopyText(); text.select(); copied = true; + setTimeout(sendText, 0); }; var onCut = function() { @@ -78,6 +79,7 @@ var TextInput = function(parentNode, host) { text.value = host.getCopyText(); host.onCut(); text.select(); + setTimeout(sendText, 0); }; event.addListener(text, "keypress", onTextInput);