Преглед на файлове

Fix: Focus the editor before executing a command

panr преди 5 години
родител
ревизия
ecb6f6b57f
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      packages/ckeditor5-horizontal-line/src/horizontallineui.js

+ 4 - 1
packages/ckeditor5-horizontal-line/src/horizontallineui.js

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