Browse Source

:art: fix https://github.com/siyuan-note/siyuan/issues/11647

Vanessa 1 year ago
parent
commit
64e580157b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/src/protyle/wysiwyg/keydown.ts

+ 2 - 1
app/src/protyle/wysiwyg/keydown.ts

@@ -691,7 +691,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
                 }
             }
             if (event.key === "ArrowDown") {
-                if (nodeElement.isSameNode(protyle.wysiwyg.element.lastElementChild)) {
+                if (nodeEditableElement?.textContent.trimRight().substr(position.start).indexOf("\n") === -1 &&
+                    nodeElement.isSameNode(protyle.wysiwyg.element.lastElementChild)) {
                     setLastNodeRange(getContenteditableElement(nodeEditableElement), range, false);
                     range.collapse(false);
                     event.stopPropagation();