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)