Skip to content
Permalink
Browse files

Merge branch 't/12332'

  • Loading branch information...
Reinmar committed Sep 22, 2014
2 parents 9fe1013 + 721a661 commit ea48ac5fc49d4a1918648db79c993551527380ea
Showing with 8 additions and 7 deletions.
  1. +1 −0 CHANGES.md
  2. +7 −7 plugins/undo/plugin.js
@@ -26,6 +26,7 @@ Fixed Issues:
* [#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.
* [#12332](http://dev.ckeditor.com/ticket/12332): Fixed: Lowered DOM events listeners' priorities in Undo Manager in order to avoid ambiguity.

## CKEditor 4.4.4

@@ -1055,33 +1055,33 @@
if ( UndoManager.ieFunctionalKeysBug( evt.data.getKey() ) ) {
that.onInput();
}
} );
}, null, null, 999 );

// Only IE can't use input event, because it's not fired in contenteditable.
editable.attachListener( editable, CKEDITOR.env.ie ? 'keypress' : 'input', that.onInput, that );
editable.attachListener( editable, ( CKEDITOR.env.ie ? 'keypress' : 'input' ), that.onInput, that, null, 999 );

// Keyup executes main snapshot logic.
editable.attachListener( editable, 'keyup', that.onKeyup, that );
editable.attachListener( editable, 'keyup', that.onKeyup, that, null, 999 );

// On paste and drop we need to ignore input event.
// It would result with calling undoManager.type() on any following key.
editable.attachListener( editable, 'paste', that.ignoreInputEventListener, that );
editable.attachListener( editable, 'drop', that.ignoreInputEventListener, that );
editable.attachListener( editable, 'paste', that.ignoreInputEventListener, that, null, 999 );
editable.attachListener( editable, 'drop', that.ignoreInputEventListener, that, null, 999 );

// 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.
// #12324 comment:4
editable.attachListener( editable.isInline() ? editable : editor.document.getDocumentElement(), 'click', function() {
that.onNavigationKey();
} );
}, null, null, 999 );

// When pressing `Tab` key while editable is focused, `keyup` event is not fired.
// Which means that record for `tab` key stays in key events stack.
// We assume that when editor is blurred `tab` key is already up.
editable.attachListener( this.undoManager.editor, 'blur', function() {
that.keyEventsStack.remove( 9 /*Tab*/ );
} );
}, null, null, 999 );
}
};

0 comments on commit ea48ac5

Please sign in to comment.
You can’t perform that action at this time.