From cb1e6774e25d7be93ee237015e8e656ca31563d9 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 26 Sep 2024 17:01:54 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/12593 --- app/src/protyle/wysiwyg/input.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index 0c9ba96bb..5e2b02e7f 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -123,8 +123,9 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: let focusHR = false; if (["---", "___", "***"].includes(editElement.textContent) && type !== "NodeCodeBlock") { html = `
`; - const nextBlockElement = getNextBlock(editElement); - if (nextBlockElement) { + // https://github.com/siyuan-note/siyuan/issues/12593 + const nextBlockElement = blockElement.nextElementSibling; + if (nextBlockElement && nextBlockElement.getAttribute("data-node-id")) { if (!isNotEditBlock(nextBlockElement)) { focusBlock(nextBlockElement); } else {