react-toastify icon indicating copy to clipboard operation
react-toastify copied to clipboard

The pauseOnFocusLoss does not work in Chrome and Edge

Open britez13 opened this issue 1 year ago • 3 comments

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 avatar Jan 07 '25 19:01 britez13

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.

rawcomposition avatar Jan 08 '25 15:01 rawcomposition

Hey! The code that handle this part hasn't changed for a while. I'll have to go through chromium bug tracker to see if I can find something related to that

fkhadra avatar Jan 09 '25 12:01 fkhadra

@fkhadra what is the status of this?

Mikilll94 avatar Sep 02 '25 10:09 Mikilll94