Roo/form/HtmlEditor.js
authorEdward <edward@roojs.com>
Mon, 8 Jun 2015 09:09:54 +0000 (17:09 +0800)
committerEdward <edward@roojs.com>
Mon, 8 Jun 2015 09:09:54 +0000 (17:09 +0800)
Roo/form/HtmlEditor.js

index 9a9dc67..d9ef451 100644 (file)
@@ -323,13 +323,8 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, {
                     return;
                 }
                 
-                //var selection = window.getSelection();
-                var range = document.createRange();
-                range.selectNodeContents(this.el.dom);
-                range.collapse(true);
-               range.moveEnd('character', pos);
-               range.moveStart('character', pos);
-               range.select();
+                this.el.dom.selectionStart = pos;
+                this.el.dom.selectionEnd = curr;
             },
             
             "end" : function(e){