8
0
Pārlūkot izejas kodu

Merge pull request #12 from ckeditor/i/353

Fix: Focus the editor before executing toolbar buttons' command. See ckeditor/ckeditor5#353.
Piotrek Koszuliński 5 gadi atpakaļ
vecāks
revīzija
f43ea62571

+ 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;
 		} );