diff options
| author | Fuwn <[email protected]> | 2024-04-15 19:37:30 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-04-15 19:37:30 -0700 |
| commit | 27947a98fce158db4d7cc198b91814149ff26837 (patch) | |
| tree | ff9dd4c3a4fb913e5a27690aa4617e8b433db674 /src/lib/Tooltip | |
| parent | feat(tooltip): preserve newlines (diff) | |
| download | due.moe-27947a98fce158db4d7cc198b91814149ff26837.tar.xz due.moe-27947a98fce158db4d7cc198b91814149ff26837.zip | |
fix(tooltip): scrollY
Diffstat (limited to 'src/lib/Tooltip')
| -rw-r--r-- | src/lib/Tooltip/tooltip.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/Tooltip/tooltip.ts b/src/lib/Tooltip/tooltip.ts index 79261885..b1381b62 100644 --- a/src/lib/Tooltip/tooltip.ts +++ b/src/lib/Tooltip/tooltip.ts @@ -47,7 +47,7 @@ const tooltip = (element: HTMLElement) => { if (top < 0) top = rect.top + rect.height + offset; tooltipDiv.style.left = `${left}px`; - tooltipDiv.style.top = `${top}px`; + tooltipDiv.style.top = `${top + window.scrollY}px`; return; } |