diff --git a/source/Ox.UI/js/Form/EditableContent.js b/source/Ox.UI/js/Form/EditableContent.js index b9a31524..40bc271a 100644 --- a/source/Ox.UI/js/Form/EditableContent.js +++ b/source/Ox.UI/js/Form/EditableContent.js @@ -213,14 +213,14 @@ Ox.EditableContent = function(options, self) { var range = document.createRange(), selection = window.getSelection(); that.$element[0].focus(); - selection.removeAllRanges(); if (self.options.collapseToEnd) { + selection.removeAllRanges(); range.selectNodeContents(that.$element[0]); selection.addRange(range); - setTimeout(function() { - selection.collapseToEnd(); - }); } + setTimeout(function() { + selection.collapseToEnd(); + }); } return that;