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 does not show when hover on MenuItem #10502

Closed
1 task done
palaniichukdmytro opened this issue Mar 2, 2018 · 6 comments
Closed
1 task done

Tooltip does not show when hover on MenuItem #10502

palaniichukdmytro opened this issue Mar 2, 2018 · 6 comments
Assignees
Labels
bug 🐛 Something doesn't work component: tooltip This is the name of the generic UI component, not the React module!
Milestone

Comments

@palaniichukdmytro
Copy link
Contributor

palaniichukdmytro commented Mar 2, 2018

When I hover over MenuItem component which wrapped to Toolip, Tooltip does not fire.

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

Expected Behavior

Tooltip should be shown on hover

Current Behavior

Tooltip does not show when hovering on MenuItem

Steps to Reproduce (for bugs)

https://codesandbox.io/s/9jyv058xyr

Context

Your Environment

Tech Version
Material-UI v1.0.0-beta.34
React 16.2.0
browser chrome 64
etc
@oliviertassinari oliviertassinari added the component: tooltip This is the name of the generic UI component, not the React module! label Mar 2, 2018
@kgregory
Copy link
Member

kgregory commented Mar 2, 2018

Clarification:

A Tooltip will not appear on a disabled MenuItem. In your reproduction case, you've added the Tooltip to your Logout MenuItem which is disabled.

It will appear for a MenuItem that is not disabled, but if there is not enough room for the tooltip, it will behave erratically.

See this codesandbox . It increases the width of the Menu to accomodate the Tooltip and everything appears to be working. Is this your expected behavior? If not, would you please elaborate?

@palaniichukdmytro
Copy link
Contributor Author

Actually, I can show even on disable an item, just wrapped MenuItem to div, I've already solved this issue previously because tooltip populates events to the child. So you can check that it possible to show it on disabling one here https://codesandbox.io/s/6zx6j184z3
But the real problem to show tooltip from the right of the menu item, not inside or over on menu item.

@kgregory
Copy link
Member

kgregory commented Mar 2, 2018

Okay, so it is possible to display a Tooltip on a disabled MenuItem if you wrap the entire MenuItem in a div and wrap that with a Tooltip 😄

...the real problem to show tooltip from the right of the menu item, not inside or over on menu item.

Good clarification of the issue.

@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Mar 31, 2018
@JosephJvB
Copy link

@palaniichukdmytro
Thanks for your fix with the div wrapper. I also found that the Tooltip didn't respect any placement properties you gave it.
I was also experiencing this issue #10735 so a quick hack I'm using to position the Tooltip is this:

<Tooltip PopperProps={{ style: { pointerEvents: 'none', marginTop: '40px' } }}>
  ...
</Tooltip>

It's not pretty but maybe it's a quick fix for now.

@oliviertassinari oliviertassinari added this to the post v1.0.0 milestone May 20, 2018
@oliviertassinari oliviertassinari self-assigned this Jun 22, 2018
@oliviertassinari
Copy link
Member

I have updated the reproduction to the latest version: https://codesandbox.io/s/926jp1qwyr.

@cmacdonnacha
Copy link

Okay, so it is possible to display a Tooltip on a disabled MenuItem if you wrap the entire MenuItem in a div and wrap that with a Tooltip 😄

...the real problem to show tooltip from the right of the menu item, not inside or over on menu item.

Good clarification of the issue.

The only problem with this is that it's not accessibility friendly as you can't navigate using a keyboard only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: tooltip This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

5 participants