From ee6b54046fb3c6a749107ee856a593844db86af4 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Fri, 19 Aug 2011 16:35:05 +0200 Subject: [PATCH] fix copy and paste in chrome --- lib/ace/keyboard/textinput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index c4883808..fc465db6 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -185,7 +185,7 @@ var TextInput = function(parentNode, host) { } }); - if ("onbeforecopy" in text) { + if ("onbeforecopy" in text && typeof clipboardData !== "undefined") { event.addListener(text, "beforecopy", function(e) { var copyText = host.getCopyText(); if(copyText)