Browse Source

Fix: Focus the editor before executing a command

panr 5 years ago
parent
commit
400b17b0a7
1 changed files with 4 additions and 1 deletions
  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;
 		} );