-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Tooltip doesn't disappears if item is clicked and focused #12246
Comments
It's a feature: #12131 |
Great, is that what disableFocusListener is for? |
Yes |
I would suggest that this be set to true by default. It seems nonsensical behaviour for simple button icons, and means people need to spend some time Googling their way to this page to resolve it (it's difficult to interpret this behaviour from the docs alone) . |
@rooch84 For reference, Bootstrap is using the same default: https://getbootstrap.com/docs/4.1/components/tooltips/#examples. |
What is the right way to make a tooltip disappear when clicked? disableFocusListener doesn't seem to work. I want the tooltip to show up onHover but disappear if it is clicked. |
@steverecio For custom behaviors, control the open state with the props: https://next.material-ui.com/components/tooltips/#controlled-tooltips |
@oliviertassinari following the release of 1.4.1 there is a new issue where if there is an item that can be clicked and focused (e.g. a button or radio button) the tooltip no longer disappears.
https://codesandbox.io/s/qjxo6nv7w
Expected Behavior
Tooltip should disappear when mouse is moved away after click.
Current Behavior
The tooltip doesn't disappear.
Steps to Reproduce
In sandbox:
https://codesandbox.io/s/qjxo6nv7w
Your Environment
The text was updated successfully, but these errors were encountered: