From 2fb3f5e9d04621d307b740a07cf3683fc6ea22d2 Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Fri, 19 Dec 2025 11:07:02 +0800 Subject: [PATCH] :art: Improve the inline memo and hyperlink tooltip display https://ld246.com/article/1765979871054 (#16625) --- app/src/block/popover.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts index 80766f44e..ed794d17c 100644 --- a/app/src/block/popover.ts +++ b/app/src/block/popover.ts @@ -81,13 +81,13 @@ export const initBlockPopover = (app: App) => { } } let tooltipSpace: number | undefined; - if (!tip && aElement.getAttribute("data-type") === "inline-memo") { + if (!tip && aElement.getAttribute("data-type")?.includes("inline-memo")) { tip = escapeHtml(aElement.getAttribute("data-inline-memo-content")); tooltipClass = "memo"; // 为行级备注添加 class https://github.com/siyuan-note/siyuan/issues/6161 tooltipSpace = 0; // tooltip 和备注元素之间不能有空隙 https://github.com/siyuan-note/siyuan/issues/14796#issuecomment-3649757267 } if (!tip) { - if (aElement.getAttribute("data-type") === "a") { + if (aElement.getAttribute("data-type")?.includes("a")) { tooltipClass = "href"; // 为超链接添加 class https://github.com/siyuan-note/siyuan/issues/11440#issuecomment-2119080691 tooltipSpace = 0; }