From 510d6475b19745ffdce7a638f8de7fe6a665cf7f Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 27 May 2022 21:33:30 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=AE=8C=E5=96=84=20https://ld246.com/?= =?UTF-8?q?article/1653184732199/comment/1653614587206=3Fr=3DVanessa#comme?= =?UTF-8?q?nts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/menus/protyle.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 2c6e29711..fb35844ce 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -65,6 +65,11 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => { }); } }); + inputElement.addEventListener("keydown", (event) => { + if (event.key === "Enter" && !event.isComposing) { + window.siyuan.menus.menu.remove(); + } + }); } }).element); window.siyuan.menus.menu.append(new MenuItem({