Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Having issues with ng-idle/core onIdleEnd & Mat-Dialog #220

Open
alobban opened this issue Oct 5, 2018 · 1 comment
Open

Having issues with ng-idle/core onIdleEnd & Mat-Dialog #220

alobban opened this issue Oct 5, 2018 · 1 comment

Comments

@alobban
Copy link

alobban commented Oct 5, 2018

The scenario

when ever a user has gone idle, a dialog (popup) displays a countdown how long until the user is logged out of the system. If the user return prior to being logged out with mouse activity, the countdown will halt and the dialog will close/disappear.

Issue

However, in Angular 5, this feature was working fine until I upgraded to Angular 6. When ever the user returns prior to onTimeout, it fires the onIdleEnd but the dialog doesn't disappear on mouse activity. I created an Angular 6 app to replicate the issue. I am trying to determine if this is an Ng-Idle or an Angular issue.

Stackblitz with Ng-Idle
Stackblitz showing Mat-Dialog closing after 10 second countdown
Github

Has anyone come across this issue?

@sannies
Copy link

sannies commented Jan 19, 2022

I might be late to the party but it seems to me that ng-idle kind of 'escaped the zone'.
Forcing it back into zone helps:

      ngZone.run(() => {
        this.warnLogoutDialogRef.close();
      });

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants