From 049b4d4b4b13eb9fcc44657845ad55183644c846 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 15 Jul 2025 20:46:04 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/15296 --- app/src/protyle/wysiwyg/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 916ce6b34..febd741c1 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1650,6 +1650,12 @@ export class WYSIWYG { } if (selectElement.length > 0) { range.collapse(true); + if (range.commonAncestorContainer.nodeType === 1 && + range.startContainer.childNodes[range.startOffset] && + range.startContainer.childNodes[range.startOffset].nodeType === 1 && + (range.commonAncestorContainer as HTMLElement).classList.contains("protyle-wysiwyg")) { + focusBlock(range.startContainer.childNodes[range.startOffset] as Element); + } return; } const startBlockElement = hasClosestBlock(range.startContainer);