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
Popover with Control inside Tooltip not opening #1897
Comments
Wrap child node with an extra element – https://codesandbox.io/s/rough-hooks-fne7y6?file=/src/App.tsx |
Fixed in 5.1.5 – https://codesandbox.io/s/admiring-morning-56hcsb?file=/src/App.tsx |
Report a similar issue, maybe helpful for others. @mantine/core version: 5.7.2 The following code doesn't work, only show tooltip, can't show drop menu: <Menu shadow='md' position='bottom-end'>
<Menu.Target>
<Tooltip label='aaaa'>
<ActionIcon
color='gray.9'
size='lg'
onClick={()=>console.log('click')}
>
<IconLink size={28} />
</ActionIcon>
</Tooltip>
</Menu.Target>
<Menu.Dropdown>
...
</Menu.Dropdown>
</Menu> Solutions: Solution 1: Remove the <Menu.Target>
<Tooltip label='aaaa'>
<ActionIcon
color='gray.9'
size='lg'
// onClick={()=>console.log('click')}
>
<IconLink size={28} />
</ActionIcon>
</Tooltip>
</Menu.Target> Solution 2: wrap <Menu.Target>
<Tooltip label='aaaa'>
<div>
<ActionIcon
color='gray.9'
size='lg'
onClick={() => console.log('click')}
>
<IconLink size={28} />
</ActionIcon>
</div>
</Tooltip>
</Menu.Target> |
What package has an issue
@mantine/core
Describe the bug
When trying to use a control wrapped into a
Tooltip
asPopover.Target
, the Popover doesn't open as expected, only the tooltip gets opened. The following snippet shows this behavior:In which browser did the problem occur
All of them
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/stupefied-goldstine-wy3ctr
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
No response
Possible fix
No response
The text was updated successfully, but these errors were encountered: