mantinedev / mantine

A fully featured React components library
https://mantine.dev
MIT License
26.93k stars 1.9k forks source link

Tooltip not closing on Chrome when child becomes disabled #4138

Closed ghost closed 1 year ago

ghost commented 1 year ago

What package has an issue

@mantine/core

Describe the bug

When using the Tooltip component with a button that becomes disabled by its own click, the label gets stuck and does not disappear until the button is enabled again and the component is hovered. See the provided codesandbox for a minimal reproduction.

This seems to only be an issue on Chrome (and Edge) but FireFox works fine.

What version of @mantine/hooks page do you have in package.json?

6.0.5

If possible, please include a link to a codesandbox with the reproduced problem

https://codesandbox.io/s/agitated-firefly-kk1seu?file=/src/App.tsx

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

Possible fix

No response

KilianB commented 1 year ago

There is a section for this in the documentation: https://mantine.dev/core/button/#disabled-button-with-tooltip

We are spreading the data-disabled and sx props into the button depending on the disabled condition and it's working fine.

rtivital commented 1 year ago

Floating UI does not support this case, see – https://github.com/floating-ui/floating-ui/discussions/1865 It is not planned to support it on Mantine side.