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 shows artifact when title changes to empty string

See original GitHub issue

For a very short period, the tooltip will show even when empty. If arrow was used it looks extra awkward.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When tooltip title is set to empty (via state change) while showing it will be visible for a short period without text.

Expected Behavior 🤔

Setting tooltip title to empty show hide tooltip immediately.

Steps to Reproduce 🕹

This simple codesandbox explains it best: https://codesandbox.io/s/zen-bell-iyxb5?file=/src/App.js

Context 🔦

I want to hide the tooltip as soon as a button was pressed. Instead of removing the <Tooltip> wrapping it is much simpler to set the text as empty but it causes a slight artifact.

Your Environment 🌎

Tech Version
Material-UI v5.0.0-alpha.9
React v16.13.1
Browser Chrome 85.0.4183.102

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Oct 7, 2020

@holmberd Interesting. I can definitely observe the behavior. By hiding the children, the popper does no longer know where to show the tooltip. It fallbacks to the (0, 0) position. Conditional rendering sounds like a great solution, it should yield better performance too 😃.

1reaction
holmberdcommented, Oct 3, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Tooltip shows artifact when title changes to empty string #22542
When tooltip title is set to empty (via state change) while showing it will be visible for a short period without text. Expected...
Read more >
How to avoid tooltip to display when title is null or empty?
I want to show tooltip in all gridcells in grid. But some cells I do not want to show tooltip so the TD...
Read more >
Remove tooltip if title attr is empty - jquery - Stack Overflow
I am trying to implement this in my CMS. The title attr will be generated via a custom field. If the custom field...
Read more >
Attributes - Graphviz
A string in the xdot format specifying an arbitrary background. Indicates the preferred area for a node or empty cluster.
Read more >
Release Notes MC12 - JRiverWiki - JRiver Media Center Wiki
Changed : Show Stacks on view menu changed to Show Fanned Thumbnails. ... Changed: Revised "sort empty strings last" option to sort empty...
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