Skip to content

Commit 9fe1013

Browse files
committed
Merge branch 't/12324'
2 parents 590deeb + dea75b8 commit 9fe1013

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Fixed Issues:
2525
* [#12354](http://dev.ckeditor.com/ticket/12354): Fixed: Various issues in undo manager when holding keys.
2626
* [#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.
2727
* [#12338](http://dev.ckeditor.com/ticket/12338): Fixed: CKEditor package contains unoptimised images.
28+
* [#12324](http://dev.ckeditor.com/ticket/12324): [IE8] Fixed: Undo steps not recorded when changing caret position by clicking below body.
2829

2930
## CKEditor 4.4.4
3031

plugins/undo/plugin.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,8 @@
10411041
* Attaches editable listeners required to provide the undo functionality.
10421042
*/
10431043
attachListeners: function() {
1044-
var editable = this.undoManager.editor.editable(),
1044+
var editor = this.undoManager.editor,
1045+
editable = editor.editable(),
10451046
that = this;
10461047

10471048
// We'll create a snapshot here (before DOM modification), because we'll
@@ -1070,7 +1071,8 @@
10701071
// Click should create a snapshot if needed, but shouldn't cause change event.
10711072
// Don't pass onNavigationKey directly as a listener because it accepts one argument which
10721073
// will conflict with evt passed to listener.
1073-
editable.attachListener( editable, 'click', function() {
1074+
// #12324 comment:4
1075+
editable.attachListener( editable.isInline() ? editable : editor.document.getDocumentElement(), 'click', function() {
10741076
that.onNavigationKey();
10751077
} );
10761078

tests/plugins/undo/_helpers/tools.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ var undoEventDispatchTestsTools = function( testSuite ) {
2525
var ckEvent = new CKEDITOR.dom.event( eventProperties );
2626

2727
testSuite.editor.editable().fire( eventType, ckEvent );
28+
// Fire event on the <html> element - pretend event's bubbling.
29+
testSuite.editor.document.getDocumentElement().fire( eventType, ckEvent );
2830
}
2931
};
3032

0 commit comments

Comments
 (0)