From 37f950ba4f6028f993786958eb9b3a0d2dca066b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 11 Oct 2023 09:39:22 +0800 Subject: [PATCH] :lipstick: icon --- app/src/protyle/gutter/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts index 286d1d35938..d1c6aef9b7a 100644 --- a/app/src/protyle/gutter/index.ts +++ b/app/src/protyle/gutter/index.ts @@ -1885,7 +1885,7 @@ export class Gutter { if (nodeElement.getAttribute("data-type") === "NodeAttributeView") { const iconElement = nodeElement.querySelector(".item__graphic"); if (iconElement) { - this.element.style.top = `${iconElement.getBoundingClientRect().top - (window.siyuan.config.editor.fontSize * 1.625 - 14) / 2}px`; + this.element.style.top = `${Math.max(iconElement.getBoundingClientRect().top - (window.siyuan.config.editor.fontSize * 1.625 - 14) / 2, wysiwyg.parentElement.getBoundingClientRect().top)}px`; } else { this.element.style.top = `${Math.max(rect.top, wysiwyg.parentElement.getBoundingClientRect().top) + 8}px`; }