You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the closeOpenTooltips function in packages/@react-stately/tooltip/src/useTooltipTriggerState.ts is not working properly when the isOpen prop is controlled, when the close handler is called, the currentValue(open) in useControlledState is still false thus not trigger the onOpenChange handler in the Tooltip.
let closeOpenTooltips = () => {
for (let hideTooltipId in tooltips) {
if (hideTooltipId !== id) {
tooltips[hideTooltipId](true);
delete tooltips[hideTooltipId];
}
}
};
Provide a general summary of the issue here
When multiple tooltips are open controlled, the first tooltip would not close after the cursor hovers on the second tooltip.
🤔 Expected Behavior?
The first tooltip would close after the cursor hovers on the second tooltip.
😯 Current Behavior
http://localhost:9003/?path=/story/tooltiptrigger--controlled-multiple-tooltips&providerSwitcher-express=false&strict=true
Screen.Recording.2024-04-19.at.11.00.10.AM.mov
💁 Possible Solution
closeOpenTooltips
function inpackages/@react-stately/tooltip/src/useTooltipTriggerState.ts
is not working properly when theisOpen
prop is controlled, when the close handler is called, the currentValue(open) inuseControlledState
is still false thus not trigger theonOpenChange
handler in the Tooltip.🔦 Context
No response
🖥️ Steps to Reproduce
Version
3.32.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
MacOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: