Using `forceMount` on the tooltip leaves dangling `div`s in the DOM
Describe the bug
Using forceMount on the tooltip leaves empty divs appended to the body, one for each individual tooltip instance. I'm observing it in conjunction with the presence util from solid-primitives
To Reproduce
- Install
@solid-primitives/presence - Create a presence instance based on a controlled signal for the tooltip
const presence = createPresence(open, {
transitionDuration: 100,
});
- Set the forceMount prop to:
<Tooltip forceMount={presence.isMounted()} /> - Observe that hovering over the trigger and leaving it, will result in an empty div at the end of the body
Expected behavior
Container div's should be disposed of like when the forceMount isn't being used
Screenshots The empty divs of 2 tooltips. They get reused when I hover on each tooltip again.
Desktop (please complete the following information):
- OS: Macos
- Browser Chrome
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Sounds like force mount signal true is being maintained. Would it be possible to see a minimally reproducible example? It is possible this is a bug with the presence util rather than kobalte.
I'll see to making a reproduction when time allows otherwise.
Sounds like force mount signal true is being maintained. Would it be possible to see a minimally reproducible example? It is possible this is a bug with the presence util rather than kobalte.
I'll see to making a reproduction when time allows otherwise.
I don't think that's the case, I'll try to reproduce it when I get the chance without the presence
But from what I remember, I was using the isMounted to also trigger some animations and those were working as expected
What's the best way to share a reproducible example, stackblitz?
Edit: Scratch that, I was using isVisible for the exit animation, will see if it's a presence issue
Yeah, or even a small trivial snippet that can be run to show the issue. Sounds like a possible bug, and I'll try to narrow down the problematic code. Thank you!