Skip to content

Commit

Permalink
Merge branch 't/11500b'
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Feb 18, 2014
2 parents 24f7406 + 513bbf5 commit 9d666dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -5,6 +5,7 @@ CKEditor 4 Changelog

Fixed Issues:

* [#11500](http://dev.ckeditor.com/ticket/11500): [Webkit/Blink] Fixed: Selection lost when setting data in other inline editor. Additionally, [`selection.removeAllRanges`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-removeAllRanges) is now scoped to selection's [root](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-property-root).
* [#11104](http://dev.ckeditor.com/ticket/11104): [IE] Fixed: Various issues with scroll and selection focusing widgets.
* [#11487](http://dev.ckeditor.com/ticket/11487): Moving mouse over [Enhanced Image](http://ckeditor.com/addon/image2) widget will no longer change value returned by [`Editor.checkDirty`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty) method.
* [#8673](http://dev.ckeditor.com/ticket/8673): Fixed: Webkit browsers - cannot select and remove Page Break (pagebreak).
Expand Down
4 changes: 4 additions & 0 deletions core/selection.js
Expand Up @@ -2151,6 +2151,10 @@
* Remove all the selection ranges from the document.
*/
removeAllRanges: function() {
// Don't clear selection outside this selection's root (#11500).
if ( this.getType() == CKEDITOR.SELECTION_NONE )
return;

var nativ = this.getNative();

try { nativ && nativ[ isMSSelection ? 'empty' : 'removeAllRanges' ](); }
Expand Down

0 comments on commit 9d666dc

Please sign in to comment.