From 87bd6267b7af64a59be3b852cbd7c77476b161d7 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 5 Mar 2026 17:30:12 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/17129 --- app/src/search/util.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/search/util.ts b/app/src/search/util.ts index 4449fd207..a953165e7 100644 --- a/app/src/search/util.ts +++ b/app/src/search/util.ts @@ -941,7 +941,8 @@ export const openSearchEditor = (options: { const rangeBlockElement = hasClosestBlock(currentRange.startContainer); if (rangeBlockElement) { options.id = rangeBlockElement.getAttribute("data-node-id"); - const offset = getSelectionOffset(getContenteditableElement(rangeBlockElement), null, options.protyle.highlight.ranges[options.protyle.highlight.rangeIndex]); + const offset = getSelectionOffset(getContenteditableElement(rangeBlockElement) || rangeBlockElement, + null, options.protyle.highlight.ranges[options.protyle.highlight.rangeIndex]); const scrollAttr: IScrollAttr = { rootId: options.protyle.block.rootID, focusId: options.id,