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

Commit ff8139c

Browse files
authored
Merge pull request #12 from ckeditor/i/353
Fix: Focus the editor before executing toolbar buttons' command. See ckeditor/ckeditor5#353.
2 parents 1391e25 + 5df2140 commit ff8139c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/horizontallineui.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ export default class HorizontalLineUI extends Plugin {
3535
view.bind( 'isEnabled' ).to( command, 'isEnabled' );
3636

3737
// Execute the command.
38-
this.listenTo( view, 'execute', () => editor.execute( 'horizontalLine' ) );
38+
this.listenTo( view, 'execute', () => {
39+
editor.execute( 'horizontalLine' );
40+
editor.editing.view.focus();
41+
} );
3942

4043
return view;
4144
} );

0 commit comments

Comments
 (0)