react-tippy icon indicating copy to clipboard operation
react-tippy copied to clipboard

unmountHTMLWhenHide not working

Open dan-dr opened this issue 6 years ago • 7 comments

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 avatar Dec 10 '17 01:12 dan-dr

@dan-dr is right. @tvkhoa please merge this, thanks.

abhilash-wasphi avatar Jan 25 '18 10:01 abhilash-wasphi

really needed this feature

ekfn avatar Feb 19 '18 08:02 ekfn

I'll chime in as well. Our app needs this feature.

sethdavis512 avatar Feb 26 '18 17:02 sethdavis512

Dito! Really would love for this to be merged very good tooltip component its just missing this!

jordan-verint avatar Mar 14 '18 11:03 jordan-verint

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.

tuanthieu2993 avatar Oct 06 '18 06:10 tuanthieu2993

~~This is still an issue at the base case unless I'm missing something.~~

~~https://codesandbox.io/s/6lxly339ok~~

  1. ~~Hover tooltip 1~~
  2. ~~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;
}

skh- avatar Dec 03 '18 02:12 skh-

After applying have this issue but its quite specific case with items in scroll view demo

ButuzGOL avatar Mar 27 '20 07:03 ButuzGOL