From ffb44d425006e406744f5435512fc2cee0a7aabf Mon Sep 17 00:00:00 2001 From: Artur Delura Date: Thu, 18 Sep 2014 15:37:57 +0200 Subject: [PATCH 1/3] Fixed calls onNavigationKey method in some situations. --- plugins/undo/plugin.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/undo/plugin.js b/plugins/undo/plugin.js index 88b1cece969..3fdfaf94aa6 100644 --- a/plugins/undo/plugin.js +++ b/plugins/undo/plugin.js @@ -1041,7 +1041,8 @@ * Attaches editable listeners required to provide the undo functionality. */ attachListeners: function() { - var editable = this.undoManager.editor.editable(), + var editor = this.undoManager.editor, + editable = editor.editable(), that = this; // We'll create a snapshot here (before DOM modification), because we'll @@ -1070,7 +1071,8 @@ // Click should create a snapshot if needed, but shouldn't cause change event. // Don't pass onNavigationKey directly as a listener because it accepts one argument which // will conflict with evt passed to listener. - editable.attachListener( editable, 'click', function() { + // #12324 comment:4 + editable.attachListener( editable.isInline() ? editable : editor.document.getDocumentElement(), 'click', function() { that.onNavigationKey(); } ); From e27da1d958e7796c3acfd5deae43d9f002332e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Reinmar=20Koszuli=C5=84ski?= Date: Mon, 22 Sep 2014 11:24:11 +0200 Subject: [PATCH 2/3] Tests: Pretend the editable's events are bubbling. --- tests/plugins/undo/_helpers/tools.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/plugins/undo/_helpers/tools.js b/tests/plugins/undo/_helpers/tools.js index dd7bd08bd20..05aeb29fa1e 100644 --- a/tests/plugins/undo/_helpers/tools.js +++ b/tests/plugins/undo/_helpers/tools.js @@ -25,6 +25,8 @@ var undoEventDispatchTestsTools = function( testSuite ) { var ckEvent = new CKEDITOR.dom.event( eventProperties ); testSuite.editor.editable().fire( eventType, ckEvent ); + // Fire event on the element - pretend event's bubbling. + testSuite.editor.document.getDocumentElement().fire( eventType, ckEvent ); } }; From dea75b8649028d990f3e1a2604124a14f46941a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Reinmar=20Koszuli=C5=84ski?= Date: Mon, 22 Sep 2014 11:32:16 +0200 Subject: [PATCH 3/3] Changelog entry. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 1d0b1fde9e8..86c9902e42f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -25,6 +25,7 @@ Fixed Issues: * [#12354](http://dev.ckeditor.com/ticket/12354): Fixed: Various issues in undo manager when holding keys. * [#12402](http://dev.ckeditor.com/ticket/12402): Fixed: Workaround for Blink's bug with `document.title` which breaks updating title in the full HTML mode. * [#12338](http://dev.ckeditor.com/ticket/12338): Fixed: CKEditor package contains unoptimised images. +* [#12324](http://dev.ckeditor.com/ticket/12324): [IE8] Fixed: Undo steps not recorded when changing caret position by clicking below body. ## CKEditor 4.4.4