Tooltip: showDelay still triggers Tooltip when original element is removed #4029
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
Description:
When using the
Tooltip
component withshowDelay
and we destroy the original trigger element (before theshowDelay
time runs out), theTooltip
still appears, even though the trigger element is not there anymore.Example code:
Reproducer
https://codesandbox.io/p/sandbox/eager-sea-qpwszh?file=%2Fsrc%2FApp.vue%3A8%2C8
PrimeVue version
3.29.2
Vue version
3.x
Language
ALL
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
Steps to reproduce:
Button
that can be removed (removed from render)Tooltip
(v-tooltip.bottom
to see the issue better) with ashowDelay
of2000
(enough to close the parent component before the Tooltip would show) to the element/componentshowDelay
runs outExpected behavior:
The
Button
is removed and theTooltip
is not shownActual behavior:
The
Tooltip
still appears in the top left corner, coord (0,0)Suggested fix:
Before showing the
Tooltip
, check again if the trigger element exists on the pageExpected behavior
The
Button
is removed and theTooltip
is not shownThe text was updated successfully, but these errors were encountered: