From 67e90a065b710b1182065d0c018988f19af5d2ac Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 19 May 2023 22:25:09 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/8309 --- app/src/protyle/toolbar/Font.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/protyle/toolbar/Font.ts b/app/src/protyle/toolbar/Font.ts index 7790d6784..10b393747 100644 --- a/app/src/protyle/toolbar/Font.ts +++ b/app/src/protyle/toolbar/Font.ts @@ -266,6 +266,14 @@ export const hasSameTextStyle = (currentElement: HTMLElement, sideElement: HTMLE blockRefData[2] === sideElement.textContent; } + if (textObj.type === "file-annotation-ref") { + if (currentElement.nodeType !== 3) { + return currentElement.getAttribute("data-id") === sideElement.getAttribute("data-id") && + currentElement.textContent === sideElement.textContent; + } + return textObj.color === sideElement.getAttribute("data-id"); + } + let color = ""; let webkitTextFillColor = ""; let webkitTextStroke = "";