From 05355a6b5ccdff11d1059bbae742c632ac2dc2c3 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Mon, 9 Feb 2026 07:43:30 -0600 Subject: [PATCH] fix(app): tooltip children focus loop --- packages/ui/src/components/tooltip.tsx | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/packages/ui/src/components/tooltip.tsx b/packages/ui/src/components/tooltip.tsx index b55265b79..055e50465 100644 --- a/packages/ui/src/components/tooltip.tsx +++ b/packages/ui/src/components/tooltip.tsx @@ -1,5 +1,5 @@ import { Tooltip as KobalteTooltip } from "@kobalte/core/tooltip" -import { children, createSignal, Match, onMount, splitProps, Switch, type JSX } from "solid-js" +import { createSignal, Match, splitProps, Switch, type JSX } from "solid-js" import type { ComponentProps } from "solid-js" export interface TooltipProps extends ComponentProps { @@ -40,32 +40,16 @@ export function Tooltip(props: TooltipProps) { "contentStyle", "inactive", "forceOpen", + "value", ]) - const c = children(() => local.children) - - onMount(() => { - const childElements = c() - if (childElements instanceof HTMLElement) { - childElements.addEventListener("focusin", () => setOpen(true)) - childElements.addEventListener("focusout", () => setOpen(false)) - } else if (Array.isArray(childElements)) { - for (const child of childElements) { - if (child instanceof HTMLElement) { - child.addEventListener("focusin", () => setOpen(true)) - child.addEventListener("focusout", () => setOpen(false)) - } - } - } - }) - return ( {local.children} - {c()} + {local.children} - {others.value} + {local.value} {/* */}