8
0
Piotrek Koszuliński 9 лет назад
Родитель
Сommit
9dd108a4fa
2 измененных файлов с 6 добавлено и 6 удалено
  1. 3 3
      packages/ckeditor5-link/src/link.js
  2. 3 3
      packages/ckeditor5-link/tests/link.js

+ 3 - 3
packages/ckeditor5-link/src/link.js

@@ -168,7 +168,7 @@ export default class Link extends Plugin {
 		} );
 
 		// Focus the form if balloon panel is open and tab key has been pressed.
-		editor.keystrokes.set( 'tab', ( data, cancel ) => {
+		editor.keystrokes.set( 'Tab', ( data, cancel ) => {
 			if ( balloonPanelView.isVisible && !this.formView.focusTracker.isFocused ) {
 				this.formView.focus();
 				cancel();
@@ -176,7 +176,7 @@ export default class Link extends Plugin {
 		} );
 
 		// Close the panel on esc key press when editable has focus.
-		editor.keystrokes.set( 'esc', ( data, cancel ) => {
+		editor.keystrokes.set( 'Esc', ( data, cancel ) => {
 			if ( balloonPanelView.isVisible ) {
 				this._hidePanel( true );
 				cancel();
@@ -221,7 +221,7 @@ export default class Link extends Plugin {
 		} );
 
 		// Close the panel on esc key press when the form has focus.
-		formView.keystrokes.set( 'esc', ( data, cancel ) => {
+		formView.keystrokes.set( 'Esc', ( data, cancel ) => {
 			this._hidePanel( true );
 			cancel();
 		} );

+ 3 - 3
packages/ckeditor5-link/tests/link.js

@@ -183,7 +183,7 @@ describe( 'Link', () => {
 			expect( editor.ui.focusTracker.isFocused ).to.true;
 		} );
 
-		it( 'should focus the link form on tab key press', () => {
+		it( 'should focus the link form on Tab key press', () => {
 			const keyEvtData = {
 				keyCode: keyCodes.tab,
 				preventDefault: sinon.spy(),
@@ -222,7 +222,7 @@ describe( 'Link', () => {
 
 		describe( 'close listeners', () => {
 			describe( 'keyboard', () => {
-				it( 'should close after esc key press (from editor)', () => {
+				it( 'should close after Esc key press (from editor)', () => {
 					const keyEvtData = {
 						keyCode: keyCodes.esc,
 						preventDefault: sinon.spy(),
@@ -244,7 +244,7 @@ describe( 'Link', () => {
 					sinon.assert.calledOnce( focusEditableSpy );
 				} );
 
-				it( 'should close after esc key press (from the form)', () => {
+				it( 'should close after Esc key press (from the form)', () => {
 					const keyEvtData = {
 						keyCode: keyCodes.esc,
 						preventDefault: sinon.spy(),