8
0
Просмотр исходного кода

Fix: The bindTwoStepCaretToAttribute helper should listen to keydown with the highest priority.

Aleksander Nowodzinski 7 лет назад
Родитель
Сommit
94d09a0700

+ 1 - 1
packages/ckeditor5-engine/src/utils/bindtwostepcarettoattribute.js

@@ -122,7 +122,7 @@ export default function bindTwoStepCaretToAttribute( view, model, emitter, attri
 		} else {
 			twoStepCaretHandler.handleBackwardMovement( position, data );
 		}
-	}, { priority: 'high' } );
+	}, { priority: 'highest' } );
 }
 
 /**

+ 2 - 2
packages/ckeditor5-engine/tests/utils/bindtwostepcarettoattribute.js

@@ -598,7 +598,7 @@ describe( 'bindTwoStepCaretToAttribute()', () => {
 		} );
 	} );
 
-	it( 'should listen with the high priority on view.document#keydown', () => {
+	it( 'should listen with the highest priority on view.document#keydown', () => {
 		const highestPrioritySpy = sinon.spy();
 		const highPrioritySpy = sinon.spy();
 		const normalPrioritySpy = sinon.spy();
@@ -615,8 +615,8 @@ describe( 'bindTwoStepCaretToAttribute()', () => {
 		} );
 
 		sinon.assert.callOrder(
-			highestPrioritySpy,
 			preventDefaultSpy,
+			highestPrioritySpy,
 			highPrioritySpy,
 			normalPrioritySpy );
 	} );