From 008e5e6d1b25b2830e9ebc8c3beed43122946b56 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 31 Aug 2023 12:07:52 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/9076 --- app/src/menus/Menu.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/menus/Menu.ts b/app/src/menus/Menu.ts index c72e0509e4a..98192738607 100644 --- a/app/src/menus/Menu.ts +++ b/app/src/menus/Menu.ts @@ -248,7 +248,12 @@ const getActionMenu = (element: Element, next: boolean) => { }; export const bindMenuKeydown = (event: KeyboardEvent) => { - if (window.siyuan.menus.menu.element.classList.contains("fn__none") || event.altKey || event.shiftKey || isCtrl(event)) { + if (window.siyuan.menus.menu.element.classList.contains("fn__none") + || event.altKey || event.shiftKey || isCtrl(event)) { + return false; + } + const target = event.target as HTMLElement + if (window.siyuan.menus.menu.element.contains(target) && (target.tagName === "INPUT" || target.tagName === "TEXTAREA")) { return false; } if (event.code === "ArrowDown" || event.code === "ArrowUp") {