From d9b42b502974370afa0d7897c2b5232f77da080a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 1 May 2023 11:26:11 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/8099 --- app/src/protyle/wysiwyg/keydown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 473a3c3b1..4b9f8604e 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1094,7 +1094,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { if (!selectText.trim() && (nodeElement.querySelector("tr") || nodeElement.querySelector("span"))) { // 没选中时,都是纯文本就创建子文档 https://ld246.com/article/1663073488381/comment/1664804353295#comments } else { - if (!selectText.trim()) { + if (!selectText.trim() && getContenteditableElement(nodeElement).textContent) { selectAll(protyle, nodeElement, range); } getSavePath(protyle.path, protyle.notebookId, (pathString) => {