浏览代码

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

Vanessa 11 月之前
父节点
当前提交
7514e4abcc
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/protyle/wysiwyg/keydown.ts

+ 1 - 1
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;