diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index e4ba3e1c..3f0cb9dc 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -268,11 +268,14 @@ var TextInput = function(parentNode, host) { tempStyle = text.style.cssText; text.style.cssText = - "position:fixed; z-index:100000;" + //"background:rgba(250, 0, 0, 0.3); opacity:1;" + + "position:fixed; z-index:100000;" + + (useragent.isIE ? "background:rgba(0, 0, 0, 0.03); opacity:0.1;" : "") + //"background:rgba(250, 0, 0, 0.3); opacity:1;" + "left:" + (e.clientX - 2) + "px; top:" + (e.clientY - 2) + "px;"; if (host.selection.isEmpty()) text.value = ""; + else + reset(true); if (e.type != "mousedown") return; @@ -281,7 +284,7 @@ var TextInput = function(parentNode, host) { host.renderer.$keepTextAreaAtCursor = null; // on windows context menu is opened after mouseup - if (useragent.isGecko && useragent.isWin) + if (useragent.isWin && (useragent.isGecko || useragent.isIE)) event.capture(host.container, function(e) { text.style.left = e.clientX - 2 + "px"; text.style.top = e.clientY - 2 + "px";