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

Notification not hide when in non focused tab/window #381

Open
edika99 opened this issue Feb 12, 2020 · 1 comment
Open

Notification not hide when in non focused tab/window #381

edika99 opened this issue Feb 12, 2020 · 1 comment

Comments

@edika99
Copy link

edika99 commented Feb 12, 2020

I've notice that notification shown in non focused browser windows, does not hide automatically until the windows/tab is focused again.
In my case, I have an application that send notification about some events with a PNotify and a sound. While I'm browsing on other open tabs in Chrome, I can hear the notification arriving by the sound, but when I focus again the tab where the application is running, I find all the PNotifys still shown on the application, even if is is passed a lot of time, and the notification should be expired. Then, after some seconds, all notification starts to hide, in the order that were been show.
Does this depends by a browser behaviour or is a PNotify problem?

@lbochen
Copy link

lbochen commented Jul 6, 2022

I have the same problem. It think, that the problem is window.requestAnimationFrame function that pauses when the tab is inactive and resumes after tab is focused

    window.requestAnimationFrame(() => {
      if (_state !== 'opening') {
        reject();
        _openPromise = null;
        return; 
...

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

No branches or pull requests

2 participants