You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Popover don't open when combined with Tooltip #2557
@Caio-Tera I'd like to create to separate components, one for TooltipButton and another one for PopoverButton and eventually use them both when needed instead of crating this long chain as you did. Why my code doesnt work, i.e. this part?:
@Caio-Tera how does it differ from my current implementaion? I also splitted it into to separate components which does not work. I would appreciate if someone could actually fix my code and indicate what was wrong with him.
Reacted by jovand3v, Alkis Gotovos, Shahbaz Ali Shueb, Ruofan Wei, Raymond Chen, Mitchell Sion, Anas Khan, Saurabh Shukla, Charles-Édouard Fatrane, ewnd9 and 1 more
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.
Reacted by filigreti, Veselin Nikolov, Mukhammad Khusanov, Carlos Daniel Vilaseca, Nissim Chekroun, Alvaro Martinez, Emmanuel Paul Moralde, Caenar Arteta and halviet
Reacted by Dmitry Bikishov
Reacted by jovand3v, Dorji Tshering , Svarup Desai, Nick, nursyamsu-official, Mitchell Sion, Mukhammad Khusanov, Carlos Daniel Vilaseca, Alvaro Martinez, Emmanuel Paul Moralde and 1 more
It worked for me too. Thank you very much. Though the nested order is too damn counterintuitive: TooltipProvider -> Popover -> Tooltip -> PopoverTrigger -> TooltipTrigger -> ......
If you don't want the tooltip to appear when the popover is open, this worked for me:
// A popover with tooltip.// Tooltip is disabled when the popover is open.constPopoverWithTooltip=()=>{const[open,setOpen]=useState(false)return(<Popoveropen={open}onOpenChange={setOpen}><Tooltipopen={open ? false : undefined}><TooltipTriggerasChild><PopoverTriggerasChild><Button>
Open popover
</Button></PopoverTrigger></TooltipTrigger><TooltipContent>
Tooltip content
</TooltipContent></Tooltip><PopoverContent>
Popover content
</PopoverContent></Popover>)}
If anyone has a solution that does not involve useState, I'd be happy if you shared it. Might be possible to use the data-attributes, but haven't tried.
Activity
Caio-Tera commentedon Jan 24, 2024
I could be wrong but shouldn't your code look like this?
I'm sorry if I didn't understand what you meant.
piszczu4 commentedon Jan 24, 2024
@Caio-Tera I'd like to create to separate components, one for TooltipButton and another one for PopoverButton and eventually use them both when needed instead of crating this long chain as you did. Why my code doesnt work, i.e. this part?:
Caio-Tera commentedon Jan 26, 2024
Does this make any sense to you?
I couldn't test whether it renders.
But I imagine this is the beginning of a solution?
piszczu4 commentedon Jan 26, 2024
@Caio-Tera how does it differ from my current implementaion? I also splitted it into to separate components which does not work. I would appreciate if someone could actually fix my code and indicate what was wrong with him.
jrandeniya commentedon Feb 5, 2024
This worked for me - Tooltip and Popover working together:
shadcn commentedon Feb 28, 2024
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.
Sisableng commentedon Jun 3, 2024
in my case this is worked for me
HungerDeng commentedon Feb 18, 2025
It worked for me too. Thank you very much. Though the nested order is too damn counterintuitive: TooltipProvider -> Popover -> Tooltip -> PopoverTrigger -> TooltipTrigger -> ......
mttetc commentedon Sep 10, 2025
React.Children.only expected to receive a single React element child. :(
andreastande commentedon Sep 22, 2025
If you don't want the tooltip to appear when the popover is open, this worked for me:
If anyone has a solution that does not involve useState, I'd be happy if you shared it. Might be possible to use the data-attributes, but haven't tried.
refactor: replace MUI tooltip in EditRolesButton