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

Merge pull request #164 from ckeditor/i/353

Fix: Focus the editor before executing toolbar buttons' command. See ckeditor/ckeditor5#353.
Piotrek Koszuliński 6 лет назад
Родитель
Сommit
2f506c5467
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;
 	} );