-
Notifications
You must be signed in to change notification settings - Fork 72
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
Notifications showing with timeouts but timeout starts when the browser is visible #84
Comments
Did you happen to find a solution for this? I'm running into the same problem. |
No, unfortunately not - I am also still looking for a solution. |
@Moulde I'm using the var originalCreate = Vue.prototype.$snotify['create']
Vue.prototype.$snotify['create'] = function() {
if (document.visibilityState !== 'visible') {
return
}
originalCreate.apply(Vue.prototype.$snotify, arguments)
} |
So, I have a project where something is running in the background, and sometimes create notifications, each with different timeouts.
This works fine, but if the browser is hidden on the screen, ie. minimized or something, it seems that all the notifications are shown all at once when the browser gets focus.
With all the timers also starting at once, which means that if the user has had the browser hidden for a while, it will fill the screen with notifications when the browser is then shown.
Ideally the timers would run behind the scenes, and if a notification 'expires', it should not be shown when the user opens the browser.
Alternatively I, if possible, should detect if the browser/tab is visible/active and only show notifications if that's the case - this is probably the solution I'm going with for now.
Has anyone else come up with another solution?
The text was updated successfully, but these errors were encountered: