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

Commit

Permalink
Merge pull request #12 from ckeditor/i/353
Browse files Browse the repository at this point in the history
Fix: Focus the editor before executing toolbar buttons' command. See ckeditor/ckeditor5#353.
  • Loading branch information
Reinmar authored Jan 28, 2020
2 parents 1391e25 + 5df2140 commit ff8139c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/horizontallineui.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export default class HorizontalLineUI extends Plugin {
view.bind( 'isEnabled' ).to( command, 'isEnabled' );

// Execute the command.
this.listenTo( view, 'execute', () => editor.execute( 'horizontalLine' ) );
this.listenTo( view, 'execute', () => {
editor.execute( 'horizontalLine' );
editor.editing.view.focus();
} );

return view;
} );
Expand Down

0 comments on commit ff8139c

Please sign in to comment.