Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 7b053a5

Browse files
authored
Merge pull request #16 from ckeditor/i/353
Fix: Focus the editor before executing toolbar buttons' command. See ckeditor/ckeditor5#353.
2 parents 0a448ac + c7b2463 commit 7b053a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/removeformatui.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ export default class RemoveFormatUI extends Plugin {
4747
view.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );
4848

4949
// Execute the command.
50-
this.listenTo( view, 'execute', () => editor.execute( REMOVE_FORMAT ) );
50+
this.listenTo( view, 'execute', () => {
51+
editor.execute( REMOVE_FORMAT );
52+
editor.editing.view.focus();
53+
} );
5154

5255
return view;
5356
} );

0 commit comments

Comments
 (0)