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 #17 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 committed Jan 28, 2020
2 parents e617559 + 14f856d commit e7f9d23
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/standardeditingmodeui.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ export default class StandardEditingModeUI extends Plugin {
return value ? t( 'Disable editing' ) : t( 'Enable editing' );
} );

this.listenTo( view, 'execute', () => editor.execute( 'restrictedEditingException' ) );
this.listenTo( view, 'execute', () => {
editor.execute( 'restrictedEditingException' );
editor.editing.view.focus();
} );

return view;
} );
Expand Down

0 comments on commit e7f9d23

Please sign in to comment.