Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple auto-dismiss toasts #7024

Open
brigittesaghie opened this issue Sep 12, 2024 · 1 comment
Open

Multiple auto-dismiss toasts #7024

brigittesaghie opened this issue Sep 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@brigittesaghie
Copy link

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

  1. Open the example in this link
  2. Click the 'Show toast' button a couple of times
  3. Close the toast at the top
  4. You see can the toasts below are not closing after the timeout is finished

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

@snowystinger
Copy link
Member

looks like this useHover onHoverEnd isn't called


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 #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.

@snowystinger snowystinger added the bug Something isn't working label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants