Skip to content
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

Closed
2 tasks done
llamamoray opened this issue Jul 23, 2018 · 7 comments
Closed
2 tasks done

Tooltip doesn't disappears if item is clicked and focused #12246

llamamoray opened this issue Jul 23, 2018 · 7 comments
Labels
component: tooltip This is the name of the generic UI component, not the React module! out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future)

Comments

@llamamoray
Copy link

llamamoray commented Jul 23, 2018

@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

  • This is a v1.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

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

  • hover over a form item to display tooltip
  • click item
  • move mouse away

image

Your Environment

Tech Version
Material-UI v1.4.1
React v16.3.2
browser Chrome
@llamamoray llamamoray changed the title Tooltip doesn't disappearsif item is clicked and focused Tooltip doesn't disappears if item is clicked and focused Jul 23, 2018
@oliviertassinari oliviertassinari added the out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) label Jul 23, 2018
@oliviertassinari
Copy link
Member

It's a feature: #12131

@llamamoray
Copy link
Author

Great, is that what disableFocusListener is for?

@oliviertassinari
Copy link
Member

Yes

@rooch84
Copy link

rooch84 commented Aug 2, 2018

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) .

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 2, 2018

@rooch84 For reference, Bootstrap is using the same default: https://getbootstrap.com/docs/4.1/components/tooltips/#examples.

@oliviertassinari oliviertassinari added the component: tooltip This is the name of the generic UI component, not the React module! label Aug 22, 2020
@steverecio
Copy link

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.

@oliviertassinari
Copy link
Member

@steverecio For custom behaviors, control the open state with the props: https://next.material-ui.com/components/tooltips/#controlled-tooltips

@mui mui locked as resolved and limited conversation to collaborators Mar 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: tooltip This is the name of the generic UI component, not the React module! out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future)
Projects
None yet
Development

No branches or pull requests

4 participants