diff --git a/app/src/dialog/tooltip.ts b/app/src/dialog/tooltip.ts index 7c4a6a891..16e8c6e9c 100644 --- a/app/src/dialog/tooltip.ts +++ b/app/src/dialog/tooltip.ts @@ -30,11 +30,12 @@ export const showTooltip = (message: string, target: Element, error = false) => let top = targetRect.bottom; const position = target.getAttribute("data-position"); const parentRect = target.parentElement.getBoundingClientRect(); - if (position === "right") { + if (position.startsWith("right")) { // block icon left = targetRect.right - messageElement.clientWidth; - } else if (position?.endsWith("bottom")) { - top += parseInt(position); + } + if (position?.endsWith("bottom")) { + top += parseInt(position.replace("right", "")); } else if (position === "parentE") { // file tree and outline态backlink top = parentRect.top; diff --git a/app/src/layout/topBar.ts b/app/src/layout/topBar.ts index c30e2a9fe..0c05fe373 100644 --- a/app/src/layout/topBar.ts +++ b/app/src/layout/topBar.ts @@ -42,7 +42,7 @@ export const initBar = (app: App) => {
-
+