From 68bfcb31fb4a720510be02b1145900fca54866a1 Mon Sep 17 00:00:00 2001 From: panr Date: Mon, 13 Jan 2020 14:47:04 +0100 Subject: [PATCH] Fix: Focus the editor before executing a command --- src/standardeditingmodeui.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/standardeditingmodeui.js b/src/standardeditingmodeui.js index fb8f84b4..65a4ec86 100644 --- a/src/standardeditingmodeui.js +++ b/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; } );