|
1055 | 1055 | if ( UndoManager.ieFunctionalKeysBug( evt.data.getKey() ) ) {
|
1056 | 1056 | that.onInput();
|
1057 | 1057 | }
|
1058 |
| - } ); |
| 1058 | + }, null, null, 999 ); |
1059 | 1059 |
|
1060 | 1060 | // 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 ); |
1062 | 1062 |
|
1063 | 1063 | // Keyup executes main snapshot logic.
|
1064 |
| - editable.attachListener( editable, 'keyup', that.onKeyup, that ); |
| 1064 | + editable.attachListener( editable, 'keyup', that.onKeyup, that, null, 999 ); |
1065 | 1065 |
|
1066 | 1066 | // On paste and drop we need to ignore input event.
|
1067 | 1067 | // 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 ); |
1070 | 1070 |
|
1071 | 1071 | // Click should create a snapshot if needed, but shouldn't cause change event.
|
1072 | 1072 | // Don't pass onNavigationKey directly as a listener because it accepts one argument which
|
1073 | 1073 | // will conflict with evt passed to listener.
|
1074 | 1074 | // #12324 comment:4
|
1075 | 1075 | editable.attachListener( editable.isInline() ? editable : editor.document.getDocumentElement(), 'click', function() {
|
1076 | 1076 | that.onNavigationKey();
|
1077 |
| - } ); |
| 1077 | + }, null, null, 999 ); |
1078 | 1078 |
|
1079 | 1079 | // When pressing `Tab` key while editable is focused, `keyup` event is not fired.
|
1080 | 1080 | // Which means that record for `tab` key stays in key events stack.
|
1081 | 1081 | // We assume that when editor is blurred `tab` key is already up.
|
1082 | 1082 | editable.attachListener( this.undoManager.editor, 'blur', function() {
|
1083 | 1083 | that.keyEventsStack.remove( 9 /*Tab*/ );
|
1084 |
| - } ); |
| 1084 | + }, null, null, 999 ); |
1085 | 1085 | }
|
1086 | 1086 | };
|
1087 | 1087 |
|
|
0 commit comments