react-tippy
react-tippy copied to clipboard
unmountHTMLWhenHide not working
Heyo,
It seems the tooltips never get unmounted for me.
After debugging, it seems line https://github.com/tvkhoa/react-tippy/blob/3b16f0a6ad6f778d6f4799582761146ecb160c30/src/Tooltip/js/tippy.js#L326 is at fault as getComputedStyle(tooltip).opacity === '1'
is always true.
Isn't it suppose to be !=='1'
?
@dan-dr is right. @tvkhoa please merge this, thanks.
really needed this feature
I'll chime in as well. Our app needs this feature.
Dito! Really would love for this to be merged very good tooltip component its just missing this!
Thanks @dan-dr for your contribution,
But you could please help us by creating an issue or update description to show how it happened. I have just test and could not found any case where tooltips never get unmounted
.
~~This is still an issue at the base case unless I'm missing something.~~
~~https://codesandbox.io/s/6lxly339ok~~
- ~~Hover tooltip 1~~
- ~~Inspect html: hidden element with the "tippy-popover" class is still in the DOM.~~
~~Also it seems the the element only gets visibility: hidden;
, not even display: none;
~~
edit 1:
Looks like this is only an issue when you don't import the base css: import "react-tippy/dist/tippy.css";
edit 2:
Also works if you add your own rule if not using the base tippy.css:
.tippy-popper .leave {
opacity: 0;
}
After applying have this issue but its quite specific case with items in scroll view