I have implemented a session timeout module in my angular app which monitors idle time and opens the session time out dialog and shows the countdown value on the dialog. The problem is count down value is stopping when ever i moved my mouse on that screen or atleast on touching that screen but i want to stop the countdown value on the dialog only when i click anything on the dialog not the screen . I thought this can be do this if we give the custom interrupts as shown in the below link here
For ex if i configure for only mouse click it can stop the countdown on the dialog, but that is not happening. May be that issue might be because of i am opening the session timeout dilaog from the another component.
But i am not able to stop the count down , Here is my sample code
this.idle.onIdleStart.subscribe(() => {
console.log('on idle start');
let dialogRef;
if (this.dialogRef === undefined || this.dialogRef === null) {
dialogRef = this.dialog['open'](SessionTimeoutDialogComponent, {
width: '30%',
data: {idleTime: 10, timeoutTime: 10},
panelClass: 'session-timeout-dialog'
});
this.dialogRef = dialogRef;
}
this.dialogRef.afterClosed().subscribe(result => {
this.timeoutTime = result;
});
this.dialogRef = dialogRef;
});
this.idle.onTimeoutWarning.subscribe((countdown) => {
this.timeoutTime = countdown;
this.dataService.changeVersionSelectionData(countdown);
});
Can anyone guide how can we do this ?