diff --git a/docs/_snippets/framework/tutorials/block-widget.js b/docs/_snippets/framework/tutorials/block-widget.js index cacd37bd4e1..5f43d57bb15 100644 --- a/docs/_snippets/framework/tutorials/block-widget.js +++ b/docs/_snippets/framework/tutorials/block-widget.js @@ -52,7 +52,10 @@ class SimpleBoxUI extends Plugin { buttonView.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' ); // Execute the command when the button is clicked (executed). - this.listenTo( buttonView, 'execute', () => editor.execute( 'insertSimpleBox' ) ); + this.listenTo( buttonView, 'execute', () => { + editor.execute( 'insertSimpleBox' ); + editor.editing.view.focus(); + } ); return buttonView; } );