ソースを参照

Fix: Focus the editor before executing a command

panr 5 年 前
コミット
400b17b0a7
1 ファイル変更4 行追加1 行削除
  1. 4 1
      packages/ckeditor5-remove-format/src/removeformatui.js

+ 4 - 1
packages/ckeditor5-remove-format/src/removeformatui.js

@@ -47,7 +47,10 @@ export default class RemoveFormatUI extends Plugin {
 			view.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );
 
 			// Execute the command.
-			this.listenTo( view, 'execute', () => editor.execute( REMOVE_FORMAT ) );
+			this.listenTo( view, 'execute', () => {
+				editor.execute( REMOVE_FORMAT );
+				editor.editing.view.focus();
+			} );
 
 			return view;
 		} );