Explorar o código

Fix: Focus the editor before executing a command

panr %!s(int64=6) %!d(string=hai) anos
pai
achega
8fe735b857

+ 4 - 1
packages/ckeditor5-restricted-editing/src/standardeditingmodeui.js

@@ -42,7 +42,10 @@ export default class StandardEditingModeUI extends Plugin {
 				return value ? t( 'Disable editing' ) : t( 'Enable editing' );
 			} );
 
-			this.listenTo( view, 'execute', () => editor.execute( 'restrictedEditingException' ) );
+			this.listenTo( view, 'execute', () => {
+				editor.execute( 'restrictedEditingException' );
+				editor.editing.view.focus();
+			} );
 
 			return view;
 		} );