diff options
| author | Fuwn <[email protected]> | 2024-02-03 02:18:00 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-02-03 02:18:00 -0800 |
| commit | 70ae2bdda65155e82a615966d30970bf8f8a3310 (patch) | |
| tree | 54857e0a9cc3de8891a643493ec8bfce77895529 /src/lib | |
| parent | fix(typography): opaque (diff) | |
| download | due.moe-70ae2bdda65155e82a615966d30970bf8f8a3310.tar.xz due.moe-70ae2bdda65155e82a615966d30970bf8f8a3310.zip | |
fix(tooltip): remove hiding limit
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/Tooltip/tooltip.ts | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/lib/Tooltip/tooltip.ts b/src/lib/Tooltip/tooltip.ts index 200f98ad..f9716386 100644 --- a/src/lib/Tooltip/tooltip.ts +++ b/src/lib/Tooltip/tooltip.ts @@ -6,7 +6,6 @@ const tooltip = (element: HTMLElement) => { const debounceDelay = 100; let hideTimeout: number | null = null; let debounceTimer: number | null = null; - let visible = false; if (element.dataset.tooltipDisable === 'true') return; @@ -58,7 +57,6 @@ const tooltip = (element: HTMLElement) => { updateTooltipPosition(x, y); setTimeout(() => { if (tooltipDiv) { - visible = true; tooltipDiv.style.opacity = '1'; } }, 10); @@ -66,8 +64,6 @@ const tooltip = (element: HTMLElement) => { }; const hideTooltip = () => { - if (!visible) return; - hideTimeout = window.setTimeout(() => { if (tooltipDiv) { tooltipDiv.style.opacity = '0'; @@ -77,7 +73,6 @@ const tooltip = (element: HTMLElement) => { document.body.removeChild(tooltipDiv); tooltipDiv = null; - visible = false; } }, tooltipTransitionTime); } |