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

Only start the countdown timer if the page is visible

Open DieterHolvoet opened this issue 3 years ago • 0 comments

Actual behaviour

I'm using this library with the Drupal module. This module shows messages e.g. after saving a page. It happens often that I save the page and while waiting for the new page to load, I navigate to another tab. Once I come back to the previous tab where the toast appeared, I notice that the toast has already disappeared.

Expected behaviour

Only start the countdown timer if the tab where the toast appears is open. This way, no messages can be missed. Could be made an option instead of the default behaviour.

DieterHolvoet avatar Oct 19 '22 21:10 DieterHolvoet