浏览代码

Fix: Focus the editor before executing a command

panr 5 年之前
父节点
当前提交
da721cc594
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      packages/ckeditor5-undo/src/undoui.js

+ 4 - 1
packages/ckeditor5-undo/src/undoui.js

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