Explorar el Código

Fix: Focus the editor before executing a command

panr hace 5 años
padre
commit
1002b593d2
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      packages/ckeditor5-block-quote/src/blockquoteui.js

+ 4 - 1
packages/ckeditor5-block-quote/src/blockquoteui.js

@@ -43,7 +43,10 @@ export default class BlockQuoteUI extends Plugin {
 			buttonView.bind( 'isOn', 'isEnabled' ).to( command, 'value', 'isEnabled' );
 
 			// Execute command.
-			this.listenTo( buttonView, 'execute', () => editor.execute( 'blockQuote' ) );
+			this.listenTo( buttonView, 'execute', () => {
+				editor.execute( 'blockQuote' );
+				editor.editing.view.focus();
+			} );
 
 			return buttonView;
 		} );