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

Fix: Focus the editor before executing a command

panr 5 лет назад
Родитель
Сommit
33d566f4f3
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      packages/ckeditor5-indent/src/indentui.js

+ 4 - 1
packages/ckeditor5-indent/src/indentui.js

@@ -68,7 +68,10 @@ export default class IndentUI extends Plugin {
 
 			view.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );
 
-			this.listenTo( view, 'execute', () => editor.execute( commandName ) );
+			this.listenTo( view, 'execute', () => {
+				editor.execute( commandName );
+				editor.editing.view.focus();
+			} );
 
 			return view;
 		} );