From 4f62adddc74c060d852ddaba0e1c915722611abc Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 16 Sep 2023 14:53:26 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/9194 --- app/src/block/popover.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts index aee572654..9c55c3ca7 100644 --- a/app/src/block/popover.ts +++ b/app/src/block/popover.ts @@ -44,8 +44,13 @@ export const initBlockPopover = (app: App) => { event.stopPropagation(); return; } - } else if (!aElement && !hasClosestByAttribute(event.target, "id", "tooltip", true)) { - hideTooltip(); + } else if (!aElement) { + const tipElement = hasClosestByAttribute(event.target, "id", "tooltip", true) + if (!tipElement || ( + tipElement && (tipElement.clientHeight >= tipElement.scrollHeight && tipElement.clientWidth >= tipElement.scrollWidth) + )) { + hideTooltip(); + } } if (window.siyuan.config.editor.floatWindowMode === 1 || window.siyuan.shiftIsPressed) { clearTimeout(timeoutHide);