Skip to content

Commit

Permalink
Merge branch 't/12324'
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Sep 22, 2014
2 parents 590deeb + dea75b8 commit 9fe1013
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions plugins/undo/plugin.js
Expand Up @@ -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
Expand Down Expand Up @@ -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();
} );

Expand Down
2 changes: 2 additions & 0 deletions tests/plugins/undo/_helpers/tools.js
Expand Up @@ -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 <html> element - pretend event's bubbling.
testSuite.editor.document.getDocumentElement().fire( eventType, ckEvent );
}
};

Expand Down

0 comments on commit 9fe1013

Please sign in to comment.