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

Disable hover pause behavior? #18

Open
khromov opened this issue Dec 31, 2022 · 4 comments
Open

Disable hover pause behavior? #18

khromov opened this issue Dec 31, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@khromov
Copy link

khromov commented Dec 31, 2022

By default the notification seem to have functionality that allows them to stay on the screen while hovered. Is there a way to disable this? The reason is that I quickly found some edge cases where the notifications get stuck on the screen if the browser window loses focus, and I'm not sure it's easily fixable (because the mouseleave event probably doesn't trigger even when the window is activated again, unless you actually hover over the notification again)

I would rather not deal with this complexity, especially considering the notifications don't have a dismiss button by default, so end user might get into a situation where they don't understand why the notification stays on the screen.

Would it be possible to add something like pauseOnHover: boolean to disable the behavior and have the notifications always close at exactly the duration?

PS. Although a different issue, it would be nice to have a built-in "X" button to dismiss notifications, like svelte-notifications has.

@khromov
Copy link
Author

khromov commented Dec 31, 2022

To reproduce this:

  1. Open Chrome debugger in device mode so you get the "round" cursor.
  2. Trigger a notification
  3. Click on it with your "cursor" / "tap"
  4. The notification is now stuck forever until you click/tap somewhere else on the screen.

@kbrgl
Copy link
Owner

kbrgl commented Jan 10, 2023

Thanks for the reproduction steps! I think disabling pause-on-hover is a sensible option to have.

@kbrgl kbrgl added the enhancement New feature or request label Mar 19, 2023
@pierregoutheraud
Copy link

@kbrgl Any news on this?

@IvanMatev
Copy link

Hi guys, I had the same issue with the toast getting stuck on mobile, I was able to work around it by using.
the only issue with this is being able to click through the toast.

style: 'touch-action: none; pointer-events: none;'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants