From fa50617d3c755870b38c5b86e00a380e1c2db127 Mon Sep 17 00:00:00 2001 From: Peter Meier Date: Sat, 16 May 2026 15:25:18 +0200 Subject: [PATCH] Fix Tooltip overflow-hidden clipping via portal action Portal the tooltip into document.body so overflow:hidden ancestors can't clip it. Fixed positioning + getBoundingClientRect() for placement. Co-Authored-By: Claude Sonnet 4.6 --- src/lib/ui/Tooltip.svelte | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/ui/Tooltip.svelte b/src/lib/ui/Tooltip.svelte index 4edb555..beed041 100644 --- a/src/lib/ui/Tooltip.svelte +++ b/src/lib/ui/Tooltip.svelte @@ -49,6 +49,14 @@ ? `position:fixed;top:${fixedTop}px;left:${fixedLeft}px;transform:translateY(-100%);` : `position:fixed;top:${fixedTop}px;left:${fixedLeft}px;`, ); + + // Portal action: moves the node into document.body so overflow:hidden ancestors can't clip it. + function portal(node: HTMLElement) { + document.body.appendChild(node); + return { + destroy() { node.remove(); }, + }; + }