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

Vanessa7514e4abcc29
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 98b0e163ab..11a8a8825c 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;