question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Tooltip] Tooltip doesn't hide on disabled buttons

See original GitHub issue

Describe the bug Tool tip label does not hide on a disabled button

Expected Behavior Tooltip should hide when mouse leaves target

To Reproduce

      <Stack isInline spacing={8} shouldWrapChildren>
        <Tooltip
          label="Hey there, i leave!"
          aria-label="Hey there"
          placement="left"
        >
          <Button>Button</Button>
        </Tooltip>
        <Tooltip
          label="I wont leave??"
          aria-label="I wont leave??"
          placement="right"
        >
          <Button isDisabled>Disabled Button</Button>
        </Tooltip>
      </Stack>

Suggested solution(s) I assume something to do with the focus on disabled buttons, though im not really sure how it works.

Desktop (please complete the following information):

  • OS: MacOs
  • Browser Chrome
  • Version 0.6.1

Mar-16-2020 15-28-32

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

29reactions
andreidmtcommented, Sep 10, 2021

There is also a shouldWrapChildren prop on the Tooltip component:

<Tooltip label="ipsum" shouldWrapChildren>
  <Button isDisabled>lorem</Button>
</Tooltip>
4reactions
tmikeschucommented, Jun 30, 2021

@AJFunk good find!

@rossng I’ve just been wrapping Button with a span. Still a bit noisy but less boilerplate.

<Tooltip>
  <span>
    <Button ...>...</Button>
  </span>
</Tooltip>
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to enable Bootstrap tooltip on disabled button?
This can be done via CSS. The "pointer-events" property is what's preventing the tooltip from appearing.
Read more >
How to enable Bootstrap tooltip on disabled button
To trigger tooltip on disabled button by wrapping them in <span> span tag and <div> div tag and then adding 'data-toggle','data-placement' and ' ......
Read more >
How to Show tooltip on disabled elements and ... - Syncfusion
Add a disabled element like the button element into a div whose display style is set to inline-block . · Set the pointer...
Read more >
How to enable Bootstrap tooltip on disabled button - Edureka
I need to display a tooltip on a disabled button and remove it on an enabled button. Currently, it works in reverse.
Read more >
Tooltip for Disabled button - Microsoft Q&A
May I know if you have got any chance to check my reply? If it doesn't suit your situation or you have any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found