瀏覽代碼

Fix: Focus the editor before executing a command

panr 5 年之前
父節點
當前提交
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;
 		} );