瀏覽代碼

Improved keystrokes naming.

Piotrek Koszuliński 8 年之前
父節點
當前提交
28f7436071

+ 2 - 2
packages/ckeditor5-editor-classic/src/classiceditorui.js

@@ -98,7 +98,7 @@ export default class ClassicEditorUI {
 				this.focusTracker.add( this.view.toolbar.element );
 
 				// Focus the toolbar on the keystroke, if not already focused.
-				editor.keystrokes.set( 'alt + f10', ( data, cancel ) => {
+				editor.keystrokes.set( 'Alt+F10', ( data, cancel ) => {
 					if ( this.focusTracker.isFocused && !toolbarFocusTracker.isFocused ) {
 						this.view.toolbar.focus();
 						cancel();
@@ -106,7 +106,7 @@ export default class ClassicEditorUI {
 				} );
 
 				// Blur the toolbar and bring the focus back to editable on the keystroke.
-				this.view.toolbar.keystrokes.set( 'esc', ( data, cancel ) => {
+				this.view.toolbar.keystrokes.set( 'Esc', ( data, cancel ) => {
 					if ( toolbarFocusTracker.isFocused ) {
 						editor.editing.view.focus();
 						cancel();

+ 1 - 1
packages/ckeditor5-editor-classic/tests/classiceditorui.js

@@ -147,7 +147,7 @@ describe( 'ClassicEditorUI', () => {
 		} );
 
 		describe( 'activates keyboard navigation for the toolbar', () => {
-			it( 'alt + f10: focus the first focusable toolbar item', () => {
+			it( 'Alt+F10: focus the first focusable toolbar item', () => {
 				return ui.init().then( () => {
 					const spy = sinon.spy( view.toolbar, 'focus' );
 					const toolbarFocusTracker = view.toolbar.focusTracker;