Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/17084

Vanessa7b2f7be8200e
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 0ed1308616..ef209d7dd3 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;