Tooltip shows artifact when title changes to empty string
See original GitHub issueFor 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:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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 😃.
@oliviertassinari https://codesandbox.io/s/create-react-app-template-forked-o9lzk?file=/index.js
Note: Conditional rendering is a valid work-around.