From d2c5fbb5c57d817ce3546ce12a7cb55745a888cc Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Tue, 30 Aug 2011 06:21:23 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20markitup=20=D0=B4=D0=BB=D1=8F=20=D0=B2=D1=8B?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=D0=BD=D0=B5?= =?UTF-8?q?=D1=88=D0=BD=D0=B5=D0=B3=D0=BE=20=D1=82=D0=B5=D0=BA=D1=81=D1=82?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/lib/external/jquery/markitup/jquery.markitup.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/engine/lib/external/jquery/markitup/jquery.markitup.js b/engine/lib/external/jquery/markitup/jquery.markitup.js index 67cfa334..a93ca562 100644 --- a/engine/lib/external/jquery/markitup/jquery.markitup.js +++ b/engine/lib/external/jquery/markitup/jquery.markitup.js @@ -164,7 +164,7 @@ }).click(function() { return false; }).bind("focusin", function(){ - $$.focus(); + //$$.focus(); }).mouseup(function() { if (button.call) { eval(button.call)(); @@ -286,6 +286,7 @@ root:options.root, textarea:textarea, selection:(selection||''), + selectionOuter:(selectionOuter||''), caretPosition:caretPosition, ctrlKey:ctrlKey, shiftKey:shiftKey, @@ -413,6 +414,12 @@ // get the selection function get() { + // get the selection by outer text + if ($.browser.msie) { + selectionOuter=document.selection.createRange().text; + } else { + selectionOuter=document.getSelection(); + } textarea.focus(); scrollPosition = textarea.scrollTop;