Skip to content

[BUG] Tooltips aren't completely hidden on page when not showing #918

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

Closed
nina-johnson-archive opened this issue Jan 25, 2023 · 3 comments · Fixed by #932
Closed

[BUG] Tooltips aren't completely hidden on page when not showing #918

nina-johnson-archive opened this issue Jan 25, 2023 · 3 comments · Fixed by #932
Labels

Comments

@nina-johnson-archive
Copy link

nina-johnson-archive commented Jan 25, 2023

Describe the bug

Tooltips are not being fully hidden in the DOM

Version of Package
v5.4.0

To Reproduce

If you have a list of items (particularly one longer than the view-height of the page), tooltips will take up space in the background even if not active, causing the actual height of the page to be greater than necessary (on our app this caused a huge block of scrollable white space underneath our app).

On inspection, I noticed that tooltips have a CSS property of visibility: hidden rather than display: none, causing it to take up space (even if invisible).

Expected behavior

It should be using display: none when the tooltip is not showing to properly remove it from page calculations.

@gabrieljablonski
Copy link
Member

gabrieljablonski commented Jan 25, 2023

This is definitely something we should look into. If I remember correctly, I've tried changing the display attribute instead of visibility, but that led to some weird behavior when calculating the tooltip position.

There are even some other tooltip libraries that completely remove the tooltip element from the DOM when it isn't being shown, which might be the ideal way to do it.

We'll see what we can do to improve this, thanks for the report.

@nina-johnson-archive
Copy link
Author

Thank you for your quick response - yeah, agree about another way to do it is to only generate the tooltip when there's a "request" to display it. We added a work-around on our side but it's not as smooth as we'd like it to be.

@gabrieljablonski
Copy link
Member

We're almost finished drafting up #932.

After some testing it seems like it will work fine. Any input is appreciated.
Either way, a new version should be up soon with a fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants