Closed stuymedova closed 1 week ago
7.13.4
@mantine/core
Vite
Chrome
I expect onClose to get called on click outside, but it doesn't happen. Repro (taken from the docs and adjusted slightly):
function Demo() { const [opened, { close, toggle }] = useDisclosure(false); return ( <Popover width={200} position="bottom" withArrow={true} shadow="md" opened={opened} closeOnClickOutside={true} closeOnEscape={true} onClose={() => { console.log('ok'); // on click outside onClose doesn't get called, nothing gets printed! close(); }} > <Popover.Target> <Button onClick={toggle}> {'Click to see popover'} </Button> </Popover.Target> <Popover.Dropdown style={{ pointerEvents: 'none' }}> <Text size="sm">{'This popover is shown when user clicks the target element'}</Text> </Popover.Dropdown> </Popover> ); }
No response
Duplicate of https://github.com/mantinedev/mantine/issues/7019 See the linked issue to learn more
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.13.4
What package has an issue?
@mantine/core
What framework do you use?
Vite
In which browsers you can reproduce the issue?
Chrome
Describe the bug
I expect onClose to get called on click outside, but it doesn't happen. Repro (taken from the docs and adjusted slightly):
If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
No response
Self-service