From 69fb991891614504dbc8c632daa9bc2d49676166 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 29 Jun 2024 23:57:40 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/11671 --- app/src/protyle/wysiwyg/commonHotkey.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.ts index fddadaa22..d77fdd240 100644 --- a/app/src/protyle/wysiwyg/commonHotkey.ts +++ b/app/src/protyle/wysiwyg/commonHotkey.ts @@ -150,7 +150,9 @@ export const downSelect = (options: { // Windows 中 ⌥⇧↓ 默认无选中功能会导致 https://ld246.com/article/1716635371149 } else if (endIndex < innerText.length) { // 选中下一个节点的处理在 toolbar/index.ts 中 `shift+方向键或三击选中` - if (!getNextBlock(options.nodeElement) && innerText.trimRight().substr(endIndex).indexOf("\n") === -1) { + if (!getNextBlock(options.nodeElement) && innerText.trimRight().substr(endIndex).indexOf("\n") === -1 && + // 当最后一行太长自然换行的情况 + nodeEditableElement.getBoundingClientRect().bottom - options.range.getBoundingClientRect().bottom - parseInt(getComputedStyle(nodeEditableElement).paddingBottom) < 14) { // 当为最后一个块时应选中末尾 setLastNodeRange(nodeEditableElement, options.range, false); if (options.nodeElement.classList.contains("code-block") && isExpandDown) {