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

fix(components): copy to clipboard issue on tooltip component #6128

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

iamxyzby
Copy link

When I use the tooltip component, I encountered an issue when trying to copy text from the popup by double-click.

截屏2024-12-19 16 39 12

In this scenario, when I double-click "66925386371" to select it and press ctrl+c to copy, but I got text "6692538637166925386371".
This happens because radix tooltip has a invisible dom who has same text value, so double-click action will select this invisible text also.

截屏2024-12-19 16 40 26

This pr fix this issue, i set [&>span[role='tooltip']]:select-none on TooltipPrimitive.Content, invisible text will not be selected.

Copy link

vercel bot commented Dec 19, 2024

Someone is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

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

Successfully merging this pull request may close these issues.

1 participant