From 7b2f7be8200e1341b0dfee4a7819dfb635f3c785 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 22 Feb 2026 18:27:55 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/17084 --- app/src/protyle/wysiwyg/keydown.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 0ed130861..ef209d7dd 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -93,6 +93,9 @@ export const getContentByInlineHTML = (range: Range, cb: (content: string) => vo export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { editorElement.addEventListener("keydown", async (event: KeyboardEvent & { target: HTMLElement }) => { + if (!event.key) { + return; + } if (event.target.localName === "protyle-html" || event.target.localName === "input") { event.stopPropagation(); return;