From 32657553ba8995674891a8a2c40ee4bffff0f5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Reinmar=20Koszuli=C5=84ski?= Date: Mon, 17 Feb 2014 11:50:18 +0100 Subject: [PATCH 1/2] Scope removeAllRanges to selection's root. --- core/selection.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/selection.js b/core/selection.js index 20dbc69ce9f..36ed80f8cc9 100644 --- a/core/selection.js +++ b/core/selection.js @@ -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' ](); } From 513bbf5446f242b464c33d5e949870f869f9d106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Reinmar=20Koszuli=C5=84ski?= Date: Tue, 18 Feb 2014 13:12:28 +0100 Subject: [PATCH 2/2] Changelog entry. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index c23ba2a57ae..4502ac62fd1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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).