Past Toast and loadings shown if browser tab/app is reactivated

Hi,

I am working with app which has many toast notifications. So every minute there can be few toasts displayed. When toasts were displayed and user is not actively using app/browser tab, toasts are not rendered in app. When he switches back to the app, toasts suddenly start appearing. It looks like ionic is delaying showing of the toasts if the current tab is not actively being used. It does not make sense to have this as default behaviour to me.

To reproduce see this Stackblitz https://stackblitz.com/edit/ionic-g5rt8f. The app shows 20 toasts in loop with some delay added between them.

  1. Open the app and notice that the toast is being displayed. Remember the toast that was displayed.
  2. Now switch to another browser tab and be there for couple of minutes.
  3. Switch back to Stackblitz tab. You will notice that the past toasts are being displayed to you now very quickly. This should not have happened.

The same issue happens with loaders as well. I keep seeing past loaders. I did not implement that here thinking that toast usecase should suffice to make the point.

Anybody come across such issue? Any idea what may be causing it inside Ionic?