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

Stop the timeout if the window is not focused #112

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DieterHolvoet
Copy link

@DieterHolvoet DieterHolvoet commented Dec 11, 2022

Fixes #110. This adds a new option, stopOnWindowBlur, that - similarly to the stopOnFocus option - stops the timeout timer if the user navigates away from the page and restarts the timer once the window regains focus. This prevents notifications from disappearing without the user actually having seen it. I set it to be enabled by default.

DieterHolvoet added a commit to DieterHolvoet/toastify-js that referenced this pull request Dec 13, 2022
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.

Only start the countdown timer if the page is visible
1 participant