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 = "";