Procházet zdrojové kódy

Aligned key names to our convention in few more places.

Piotrek Koszuliński před 8 roky
rodič
revize
7632e1e20e

+ 2 - 2
packages/ckeditor5-list/src/list.js

@@ -57,9 +57,9 @@ export default class List extends Plugin {
 
 		// Add tab key support.
 		// When in list item, pressing tab should indent list item, if possible.
-		// Pressing shift + tab shout outdent list item.
+		// Pressing Shift+Tab shout outdent list item.
 		this.listenTo( this.editor.editing.view, 'keydown', ( evt, data ) => {
-			let commandName = null;
+			let commandName;
 
 			if ( data.keystroke == parseKeystroke( 'Tab' ) ) {
 				commandName = 'indentList';

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

@@ -129,7 +129,7 @@ describe( 'List', () => {
 
 		beforeEach( () => {
 			domEvtDataStub = {
-				keystroke: getCode( 'tab' ),
+				keystroke: getCode( 'Tab' ),
 				preventDefault() {}
 			};
 
@@ -151,8 +151,8 @@ describe( 'List', () => {
 			expect( editor.execute.calledWithExactly( 'indentList' ) ).to.be.true;
 		} );
 
-		it( 'should execute outdentList command on shift+tab keystroke', () => {
-			domEvtDataStub.keystroke += getCode( 'shift' );
+		it( 'should execute outdentList command on Shift+Tab keystroke', () => {
+			domEvtDataStub.keystroke += getCode( 'Shift' );
 
 			editor.setData( '<ul><li>foo<ul><li>bar</li></ul></li></ul>' );
 			// Collapsing selection in model, which has just flat listItems.