radix-ui / primitives

Radix Primitives is an open-source UI component library for building high-quality, accessible design systems and web apps. Maintained by @workos.
https://radix-ui.com/primitives
MIT License
14.82k stars 717 forks source link

Tooltip Content asChild crashes #2981

Open adri1wald opened 6 days ago

adri1wald commented 6 days ago

Bug report

The Tooltip Content component crashes with asChild.

Current Behavior

It crashes when I render anything with <TooltipPrimitive.Content asChild />.

Expected behavior

It does not crash.

Reproducible example

Can't get the tempalte to work

Suggested solution

Do not render <VisuallyHiddenContentContextProvider /> inside of a component that can be asChilded

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-tooltip 1.1.0
React n/a
Browser
Assistive tech
Node n/a
npm/yarn
Operating System