Skip to content

Stop the timeout if the window is not focused#112

Open
DieterHolvoet wants to merge 2 commits into
apvarun:masterfrom
DieterHolvoet:stop-on-window-blur
Open

Stop the timeout if the window is not focused#112
DieterHolvoet wants to merge 2 commits into
apvarun:masterfrom
DieterHolvoet:stop-on-window-blur

Conversation

@DieterHolvoet

@DieterHolvoet DieterHolvoet commented Dec 11, 2022

Copy link
Copy Markdown

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