Describe the bug
If the content is passed as empty or null to the Tooltip component, the onOpenChange is only getting fired on mouseover. The function is not executed on mouseleave so the tooltip remains in an open state
To Reproduce
Steps to reproduce the behavior:
Create a Tooltip with its content as null
Log the value from onOpenChange
Hover and leave the tooltip trigger
Check the log - it will show open value as true on mouse over but won't change to false on mouseleave
Expected behavioronOpenChange should be executed on both mouse over and mouse leave
Desktop (please complete the following information):
Describe the bug If the content is passed as empty or null to the
Tooltip
component, theonOpenChange
is only getting fired on mouseover. The function is not executed on mouseleave so the tooltip remains in an open stateTo Reproduce Steps to reproduce the behavior:
Tooltip
with its content as nullonOpenChange
Expected behavior
onOpenChange
should be executed on both mouse over and mouse leaveDesktop (please complete the following information):
Additional context
Reproducible here https://codesandbox.io/s/trusting-gates-hsc2mf?file=/tooltip.tsx