Open brigittesaghie opened 1 week ago
looks like this useHover onHoverEnd isn't called https://github.com/adobe/react-spectrum/blob/73414999fcc6afab5c4bc8ec4740fe3dc1eb8502/packages/%40react-aria/toast/src/useToastRegion.ts#L37 And it only happens if you dismiss the outer most toast such that the toast region become smaller behind the cursor. This means that in most browsers onPointerLeave isn't called.
It's debatable if it's a bug in the browsers or not, they've declined to take action on this so far. See https://github.com/adobe/react-spectrum/issues/3522 for some other related issues.
We may need to do some hit detection on toast region resize to determine if we're still hovering. Or we could delay the removal onPress
by an immediate timeout or a microTask or something.
Provide a general summary of the issue here
When you open multiple auto-dismiss toasts together and you close the first (top) toast, all other toasts stay paused. It should keep running and dismiss when the timeout is finished
๐ค Expected Behavior?
All toast should be dismissed after the timeout is finished when it's no longer hovered.
๐ฏ Current Behavior
The other toasts stay paused and you will have to hover over the other toasts to get them back running.
๐ Possible Solution
No response
๐ฆ Context
No response
๐ฅ๏ธ Steps to Reproduce
Version
0.1.1-beta.54
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
iOS
๐งข Your Company/Team
No response
๐ท Tracking Issue
No response