From 6865cae76cb88aa78d7c297c637557468fdce8fc Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Sun, 19 Apr 2026 08:46:47 +0000
Subject: fix(tooltip): park measurement node off-screen to stop body resize

Absolute-positioned tooltips were appended to document.body without initial
left/top, so their static-flow position extended body scrollWidth/scrollHeight
during layout, briefly enlarging the page on hover.
---
 src/lib/Tooltip/LinkedTooltip.svelte | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/lib/Tooltip/LinkedTooltip.svelte')

diff --git a/src/lib/Tooltip/LinkedTooltip.svelte b/src/lib/Tooltip/LinkedTooltip.svelte
index b3fc6ae2..fb4faa4f 100644
--- a/src/lib/Tooltip/LinkedTooltip.svelte
+++ b/src/lib/Tooltip/LinkedTooltip.svelte
@@ -36,6 +36,9 @@ const createTooltip = () => {
 	if (!tooltipDiv) {
 		tooltipDiv = document.createElement("div");
 		tooltipDiv.style.position = "absolute";
+		tooltipDiv.style.left = "-9999px";
+		tooltipDiv.style.top = "-9999px";
+		tooltipDiv.style.visibility = "hidden";
 		tooltipDiv.style.zIndex = "1000";
 		opacity = 0;
 		tooltipDiv.style.pointerEvents = "none";
-- 
cgit v1.2.3

