From 85e087f87dc6c909860d0a7a91bb9650118c7090 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 8 Dec 2011 21:01:23 +0400 Subject: [PATCH] fix for jquery modal dialogs which doesn't break selection --- lib/ace/css/editor.css | 2 +- lib/ace/keyboard/textinput.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css index f7a5b7e8..b49e2d79 100644 --- a/lib/ace/css/editor.css +++ b/lib/ace/css/editor.css @@ -85,7 +85,7 @@ .ace_editor textarea { position: fixed; - z-index: 2000; + z-index: 0; width: 10px; height: 30px; opacity: 0; diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index b828dcf6..397178a5 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -50,7 +50,7 @@ var TextInput = function(parentNode, host) { text.setAttribute("x-palm-disable-auto-cap", true); text.style.left = "-10000px"; - parentNode.appendChild(text); + parentNode.insertBefore(text, parentNode.firstChild); var PLACEHOLDER = String.fromCharCode(0); sendText();