From 192db4f306c64ee62fcf644662eeaad0b779fc84 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 20 Sep 2025 14:49:12 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/15864 --- app/src/protyle/wysiwyg/keydown.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 2492518b4..c0147de73 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -860,7 +860,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { const nextBlockElement = hasClosestBlock(nextRange.startContainer); if (nextBlockElement && (!nextBlockElement.classList.contains("code-block") || - (nextBlockElement.classList.contains("code-block") && getContenteditableElement(nextBlockElement).textContent == "\n")) + (nextBlockElement.classList.contains("code-block") && + (getContenteditableElement(nextBlockElement).textContent == "\n") || nextBlockElement.parentElement.classList.contains("li"))) ) { // 反向删除合并为一个块时,光标应保持在尾部 https://github.com/siyuan-note/siyuan/issues/14290#issuecomment-2849810529 cloneRange.insertNode(document.createElement("wbr"));