Explorar o código

Fix: Focus the editor before executing a command

panr %!s(int64=6) %!d(string=hai) anos
pai
achega
56e46849c0
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      packages/ckeditor5-page-break/src/pagebreakui.js

+ 4 - 1
packages/ckeditor5-page-break/src/pagebreakui.js

@@ -35,7 +35,10 @@ export default class PageBreakUI extends Plugin {
 			view.bind( 'isEnabled' ).to( command, 'isEnabled' );
 
 			// Execute command.
-			this.listenTo( view, 'execute', () => editor.execute( 'pageBreak' ) );
+			this.listenTo( view, 'execute', () => {
+				editor.execute( 'pageBreak' );
+				editor.editing.view.focus();
+			} );
 
 			return view;
 		} );