diff --git a/web/src/components/ui/base/tooltip/tooltip.tsx b/web/src/components/ui/base/tooltip/tooltip.tsx index 892d94698..a27c66d07 100644 --- a/web/src/components/ui/base/tooltip/tooltip.tsx +++ b/web/src/components/ui/base/tooltip/tooltip.tsx @@ -1,5 +1,5 @@ import type { ReactNode } from "react"; -import { Tooltip as RACTooltip, TooltipTrigger, type Placement } from "react-aria-components"; +import { Focusable, Tooltip as RACTooltip, TooltipTrigger, type Placement } from "react-aria-components"; import { cn } from "@/lib/utils"; @@ -42,7 +42,16 @@ export function Tooltip({ title, placement = "top", delay = 350, className, chil return ( - {children} + {/* + * RAC 1.21 的 TooltipTrigger 通过 context 下发 hover/focus 处理与 triggerRef, + * 只有消费该上下文的组件才会真正挂上(原生 /