소스 검색

Fix: Focus the editor before executing a command

panr 6 년 전
부모
커밋
3fa406942f
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      packages/ckeditor5-list/src/utils.js

+ 4 - 1
packages/ckeditor5-list/src/utils.js

@@ -241,7 +241,10 @@ export function createUIComponent( editor, commandName, label, icon ) {
 		buttonView.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );
 
 		// Execute command.
-		buttonView.on( 'execute', () => editor.execute( commandName ) );
+		buttonView.on( 'execute', () => {
+			editor.execute( commandName );
+			editor.editing.view.focus();
+		} );
 
 		return buttonView;
 	} );