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

index 703f4a0..9ed1d43 100644 (file)
@@ -325,6 +325,7 @@ Roo.extend(Roo.form.HtmlEditor, Roo.form.Field, {
                 
                 //var selection = window.getSelection();
                 var range = document.createRange();
+                range.selectNodeContents(text);
                 range.collapse(true);
                range.moveEnd('character', pos);
                range.moveStart('character', pos);