shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
71.43k stars 4.3k forks source link

[bug]: Tooltip have a problem with the index #5031

Open LucasLuisBorges opened 1 week ago

LucasLuisBorges commented 1 week ago

Describe the bug

Screenshot_1

<Tooltip>
      <TooltipTrigger className="w-full">
        <Button variant="ghost" className="flex w-full justify-center gap-2">
          <IconComponent className="h-4 w-4" />
        </Button>
      </TooltipTrigger>
      <TooltipContent side="right">
        <p>{text}</p>
      </TooltipContent> 
     </Tooltip>

The problem is that it always stays below, even though I put a higher z-index

Affected component/components

Tooltip

How to reproduce

  1. Clone component
  2. Usage component

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

Windows, Arc and Brave

Before submitting

huangfulei commented 4 days ago

you can wrap the content with