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/15294

Vanessa3d7191b13d57
diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts
index f7bdfebe4f..01f09fc1e1 100644
--- a/app/src/protyle/header/Title.ts
+++ b/app/src/protyle/header/Title.ts
@@ -140,8 +140,8 @@ export class Title {
event.stopPropagation();
}
} else if (event.key === "Enter") {
- const editElment = getContenteditableElement(protyle.wysiwyg.element.firstElementChild);
- if (editElment && editElment.textContent === "" && !protyle.wysiwyg.element.firstElementChild.classList.contains("av")) {
+ const editElement = getContenteditableElement(protyle.wysiwyg.element.firstElementChild);
+ if (editElement && editElement.textContent === "" && editElement.getAttribute("placeholder")) {
// 配合提示文本使用,避免提示文本挤压到第二个块中
focusBlock(protyle.wysiwyg.element.firstElementChild, protyle.wysiwyg.element);
} else {