material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[Joy/Tooltip] Interactive doesn't work

Open sandrosc opened this issue 1 year ago • 8 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Steps to reproduce 🕹

Link to live example: https://mui.com/joy-ui/react-tooltip/

Steps:

  1. Hover over one of the variants button, e.g. "Solid"
  2. A tooltip with the text "Delete" opens
  3. Move the mouse down in the direction of the tooltip

Current behavior 😯

Tooltip closes immediately as soon as mouse leaves the button.

Expected behavior 🤔

Tooltip should stay open while the mouse moves into the direction of the tooltip and when hovering over the tooltip.

Context 🔦

For a working example see https://mui.com/material-ui/react-tooltip/.

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

sandrosc avatar May 02 '23 08:05 sandrosc

It is actually present ! Take at look at https://mui.com/material-ui/react-tooltip/#triggers

Walids35 avatar May 02 '23 19:05 Walids35

@sandrosc, I'm experiencing this same issue in my project.

This functionality is very important for my users. I'm using tooltips to display cut-off text (ellipsis) in a narrow table cell, so that users can view the entire long string and copy at will.

Thank you for opening this issue!

mankittens avatar May 03 '23 03:05 mankittens

@sandrosc Thanks for reporting this - it's very reproducible in our docs

mj12albert avatar May 03 '23 04:05 mj12albert

Agree, we should fix it. As a workaround you can use the leaveDelay prop, for e.g. set it to 500 (ms). cc @hbjORbj

mnajdova avatar May 03 '23 07:05 mnajdova

@hbjORbj are you working on this? If not, could you please assign this to me?

nicolas-ot avatar May 03 '23 09:05 nicolas-ot

@nicolas-ot No I haven't started this task. Please feel free to start working on it and requesting a review from me.

hbjORbj avatar May 03 '23 12:05 hbjORbj

i am working on this

nicolas-ot avatar May 03 '23 13:05 nicolas-ot

Agree, we should fix it. As a workaround you can use the leaveDelay prop, for e.g. set it to 500 (ms). cc @hbjORbj

Just a note, this workaround doesn't work. The tooltip will still be removed after the delay. I'm still trying to fix this issue.

nicolas-ot avatar May 04 '23 11:05 nicolas-ot

Thanks everyone for the quick fix to this problem! :)

sandrosc avatar Jun 12 '23 15:06 sandrosc

Thanks everyone for the quick fix to this problem! :)

Huge 👏 to @nicolas-ot!

siriwatknp avatar Jun 13 '23 12:06 siriwatknp