Skip to content

Commit ea48ac5

Browse files
committed
Merge branch 't/12332'
2 parents 9fe1013 + 721a661 commit ea48ac5

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Fixed Issues:
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.
2828
* [#12324](http://dev.ckeditor.com/ticket/12324): [IE8] Fixed: Undo steps not recorded when changing caret position by clicking below body.
29+
* [#12332](http://dev.ckeditor.com/ticket/12332): Fixed: Lowered DOM events listeners' priorities in Undo Manager in order to avoid ambiguity.
2930

3031
## CKEditor 4.4.4
3132

plugins/undo/plugin.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,33 +1055,33 @@
10551055
if ( UndoManager.ieFunctionalKeysBug( evt.data.getKey() ) ) {
10561056
that.onInput();
10571057
}
1058-
} );
1058+
}, null, null, 999 );
10591059

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

10631063
// Keyup executes main snapshot logic.
1064-
editable.attachListener( editable, 'keyup', that.onKeyup, that );
1064+
editable.attachListener( editable, 'keyup', that.onKeyup, that, null, 999 );
10651065

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

10711071
// Click should create a snapshot if needed, but shouldn't cause change event.
10721072
// Don't pass onNavigationKey directly as a listener because it accepts one argument which
10731073
// will conflict with evt passed to listener.
10741074
// #12324 comment:4
10751075
editable.attachListener( editable.isInline() ? editable : editor.document.getDocumentElement(), 'click', function() {
10761076
that.onNavigationKey();
1077-
} );
1077+
}, null, null, 999 );
10781078

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

0 commit comments

Comments
 (0)