tippyjs icon indicating copy to clipboard operation
tippyjs copied to clipboard

With 'manual' trigger,tippy does not call "onHidden" when "show" is called successive two times.

Open chunyisong opened this issue 3 years ago • 2 comments

Bug description

With 'manual' trigger,tippy does not call "onHidden" when "show" is called successive two times.

Reproduction

Click the ShowTippy button in the demo below once,then click it again can not see the log from onHidden. If click other place but the button then the tippy hide and "onHidden" is called.

https://codepen.io/happy999/pen/vYJjKEB

chunyisong avatar Nov 08 '21 06:11 chunyisong

onHidden is only called once the tippy has fully hidden/unmounted. When clicking again this doesn't happen, so it seems correct? If you mousedown, without mouseup, you can see it gets unmounted once the transition completes, and logs out.

atomiks avatar Nov 08 '21 07:11 atomiks

onHidden is only called once the tippy has fully hidden/unmounted. When clicking again this doesn't happen, so it seems correct? If you mousedown, without mouseup, you can see it gets unmounted once the transition completes, and logs out.

Thanks! I trid to call "hide()" before "show()" but the "onHidden" still is not called. Is there a "onUnmounted" ? Or other way to hook to have chance like onHidden? I really want to know the state change whenever hide-action already executed.

chunyisong avatar Nov 08 '21 08:11 chunyisong