From 372c46e2ad6152a0676e1043801404b6948cd8ea Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 27 Feb 2023 23:27:17 -0500 Subject: [PATCH] Escape to defocus editor --- shared/editor/plugins/Keys.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shared/editor/plugins/Keys.ts b/shared/editor/plugins/Keys.ts index 589fd5aae6..267a162a70 100644 --- a/shared/editor/plugins/Keys.ts +++ b/shared/editor/plugins/Keys.ts @@ -41,6 +41,10 @@ export default class Keys extends Extension { } return false; }, + Escape: () => { + (this.editor.view.dom as HTMLElement).blur(); + return true; + }, }; }