Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip Content asChild crashes #2981

Open
adri1wald opened this issue Jun 26, 2024 · 3 comments
Open

Tooltip Content asChild crashes #2981

adri1wald opened this issue Jun 26, 2024 · 3 comments

Comments

@adri1wald
Copy link

adri1wald commented Jun 26, 2024

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
@OlegWock
Copy link

OlegWock commented Aug 1, 2024

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)

@ryparker
Copy link

ryparker commented Aug 8, 2024

Same with Trigger

@alexfreska
Copy link

➕ also hitting this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants