From efdff6c71b12a21c9131e421f05c1564e7152725 Mon Sep 17 00:00:00 2001 From: Neil Jenkins Date: Wed, 8 Nov 2023 09:44:16 +0100 Subject: [PATCH] Focus editor after undo/redo This matches the behaviour of all the other commands, and means if you add toolbar buttons for undo/redo they work as expected. Fixes #445. --- source/Editor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Editor.ts b/source/Editor.ts index 182b0e6..0440229 100644 --- a/source/Editor.ts +++ b/source/Editor.ts @@ -905,7 +905,7 @@ class Squire { }); this.fireEvent('input'); } - return this; + return this.focus(); } redo(): Squire { @@ -926,7 +926,7 @@ class Squire { }); this.fireEvent('input'); } - return this; + return this.focus(); } // --- Get and set data