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

The pauseOnFocusLoss does not work in Chrome and Edge #1199

Open
britez13 opened this issue Jan 7, 2025 · 1 comment
Open

The pauseOnFocusLoss does not work in Chrome and Edge #1199

britez13 opened this issue Jan 7, 2025 · 1 comment

Comments

@britez13
Copy link

britez13 commented Jan 7, 2025

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
I've tested on Chrome, Firefox and Edge if the pauseOnFocusLoss property (which is true by default from what I've read) works as expected, but in Chrome and Edge it doesn't stop when the tab where the toast was displayed is changed. On Firefox it worked fine.

The behavior can be replicated with the react-toastify doc site itself.

@britez13 britez13 changed the title The pauseOnFocusLoss does not work in Chrome The pauseOnFocusLoss does not work in Chrome and Edge Jan 7, 2025
@rawcomposition
Copy link

Same. The progress bar continues to decrease, but the internal timer does seem to pause correctly.

Here's my steps to reproduce it (most of the time):

  1. Open two tabs to the same URL
  2. Trigger an alert with 30 second autoClose duration
  3. Go to the other tab for 10 seconds
  4. Go back to the initial tab - the progress bar has gone down 10 seconds
  5. Wait the remaining ~20 seconds, the progress bar reaches 0 but the notification does not disappear
  6. Wait 10 more seconds, the notification then disappear.

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