-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[BUG] - Tooltip stays open more than it should #4301
Comments
I couldn't reproduce the issue on the documentation. Can you please try again since we've deployed a new version? |
I did replicate it sometimes, but it was harder this time. I made Youtube video where are shown my successful attempts of recreating the issue. The video is not public so only those one who have link can access it. The problem I think happens when two Tooltips are opened at the almost same time. I don't know if this is the case, but by the video it looks like that. In my project i have sidebar navigation with buttons where each of them have tooltip with info where the button will navigate and sometimes those tooltips stuck there and that's how i came across this issue. I hope this helps to solve this issue. |
I also have this issue now. |
This is a recurring problem on our website. I fixed it by applying a delay on all of our tooltips. |
Recurring you say.. 🤔. Never had this issue before until 2.6. But have only used NextUI for the last 1.5 years. |
Which delay you added? Delay for opening or closing? |
started happening after v2.6 upgrade |
The issue seem to happen when delay and closeDelay are set to 0. Moving over / quickly passing the element will make the tooltip "stuck". |
I am also having this issue. I experimented with a few different delays and still had the issue. The example in my video is very forced but it easily happens from just navigating around the page normally (even with a delay, the tooltip sequence and unwanted retention eventually begins) Screen.Recording.2024-12-29.at.3.02.41.AM.movHere's another video of it being replicated on the doc website Screen.Recording.2024-12-29.at.2.59.07.PM.mov |
The problem appears to occur more frequently when Tooltips are triggered on a high refresh rate screen. |
I have a hunch that unmounting of the AnimatePresence container in the tooltip code could be causing it, have dealt with some similar framer-motion issues myself in recent projects. Currently the AnimatePresence is only rendered when isOpen is true but the main conditional rendering needs to be a child of a constant AnimatePresence. I will test this and try to make a PR as soon as I get a free moment to get a local version of NextUI running. Update: I opened a PR with a fix. The issue persisted after the AnimatePresence fix, but adding a key to the main motion div to make sure it is properly tracked when rendering seems to have fixed the issue. Example via Claude: |
NextUI Version
@nextui-org/[email protected] (or the one that is in the documentation)
Describe the bug
When you rapidly move cursor over elements with Tooltip element the tooltip stays sometimes open.
In the provided image, there are multiple buttons that I moved my mouse over.
Your Example Website or App
https://nextui.org/docs/components/tooltip#placements
Steps to Reproduce the Bug or Issue
Expected behavior
The tooltips should close after while and when I dont hover over any of them the Tooltip should close.
Screenshots or Videos
Operating System Version
Ubuntu 24.04.1 LTS
Browser
Chrome
The text was updated successfully, but these errors were encountered: