This commit is contained in:
Vanessa 2023-09-16 14:53:26 +08:00
parent b94a28eca0
commit 4f62adddc7

View file

@ -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);