From 7514e4abcc29f8d7e1c6ba613976f9d33a1d720c Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 16 Sep 2024 17:53:34 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/11581 --- 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 98b0e163a..11a8a8825 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -663,7 +663,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { } } } else { - if (nodeEditableElement?.innerText.substr(0, position.end).indexOf("\n") === -1) { + if (nodeEditableElement?.innerText.substr(0, position.end).indexOf("\n") === -1 || (!isMac() && position.start === 0)) { let previousElement: HTMLElement = getPreviousBlock(nodeElement) as HTMLElement; if (previousElement) { previousElement = getLastBlock(previousElement) as HTMLElement;