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

Pause timer if toast appears when the document is hidden #426

Merged

Conversation

oleksiiteplenko
Copy link
Contributor

@oleksiiteplenko oleksiiteplenko commented May 28, 2024

Issue:

The flag pauseWhenPageIsHidden works fine when you are on the page -> toast appears -> you switch to another tab = timers paused. But when the tab with your app is in the background and you render your toasts(e.g. through WebSockets) timers don't pause.

What has been done:

  • add a default value for the useIsDocumentHidden hook

Copy link

vercel bot commented May 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sonner ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 2:25pm

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

Successfully merging this pull request may close these issues.

2 participants