From ae4adfeba455cb7f68e91ce3617d29206101f0fb Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 22 May 2025 19:32:52 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14870 --- app/src/util/highlightById.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/util/highlightById.ts b/app/src/util/highlightById.ts index 1fab1ff39..31953d74d 100644 --- a/app/src/util/highlightById.ts +++ b/app/src/util/highlightById.ts @@ -1,4 +1,4 @@ -import {hasClosestBlock, hasClosestByAttribute} from "../protyle/util/hasClosest"; +import {hasClosestBlock, isInEmbedBlock} from "../protyle/util/hasClosest"; import {focusByRange, getEditorRange} from "../protyle/util/selection"; export const bgFade = (element: Element) => { @@ -22,7 +22,7 @@ export const highlightById = (protyle: IProtyle, id: string, top = false) => { } Array.from(protyleElement.querySelectorAll(`[data-node-id="${id}"]`)).find((item: HTMLElement) => { - if (!hasClosestByAttribute(item, "data-type", "block-render", true)) { + if (!isInEmbedBlock(item)) { nodeElement = item; return true; }