primitives
primitives copied to clipboard
Tooltip Content asChild crashes
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 |
Here is reproducible example:
Slightly modified (switched to react@rc and added asChild prop) official example for Tooltip.
CodeSandbox (hover over button and then see console)
Same with Trigger
➕ also hitting this issue.