From 828321641867dc1aeac100d9e0c2aeabae5f77ce Mon Sep 17 00:00:00 2001 From: Alexis Georges Date: Mon, 3 Feb 2020 11:45:56 +0100 Subject: [PATCH] fix(stark-ui): session - prevent click outside the Session Timeout Warning Dialog --- .../effects/session-timeout-warning.effect.spec.ts | 2 +- .../session-ui/effects/session-timeout-warning.effects.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/stark-ui/src/modules/session-ui/effects/session-timeout-warning.effect.spec.ts b/packages/stark-ui/src/modules/session-ui/effects/session-timeout-warning.effect.spec.ts index f70441890e..5eb424244a 100644 --- a/packages/stark-ui/src/modules/session-ui/effects/session-timeout-warning.effect.spec.ts +++ b/packages/stark-ui/src/modules/session-ui/effects/session-timeout-warning.effect.spec.ts @@ -90,7 +90,7 @@ describe("Effects: StarkSessionTimeoutWarningDialogEffects", () => { expect(mockObserver.error).not.toHaveBeenCalled(); expect(mockObserver.complete).not.toHaveBeenCalled(); expect(mockDialogService.open).toHaveBeenCalledTimes(1); - expect(mockDialogService.open).toHaveBeenCalledWith(StarkSessionTimeoutWarningDialogComponent, { data: 20 }); + expect(mockDialogService.open).toHaveBeenCalledWith(StarkSessionTimeoutWarningDialogComponent, { data: 20, disableClose: true }); expect(mockSessionService.resumeUserActivityTracking).not.toHaveBeenCalled(); diff --git a/packages/stark-ui/src/modules/session-ui/effects/session-timeout-warning.effects.ts b/packages/stark-ui/src/modules/session-ui/effects/session-timeout-warning.effects.ts index 79fcd4806f..6f6287115c 100644 --- a/packages/stark-ui/src/modules/session-ui/effects/session-timeout-warning.effects.ts +++ b/packages/stark-ui/src/modules/session-ui/effects/session-timeout-warning.effects.ts @@ -39,7 +39,10 @@ export class StarkSessionTimeoutWarningDialogEffects implements OnRunEffects { map((action: StarkSessionTimeoutCountdownStart) => { this.sessionService.pauseUserActivityTracking(); this.dialogService - .open(StarkSessionTimeoutWarningDialogComponent, { data: action.countdown }) + .open(StarkSessionTimeoutWarningDialogComponent, { + data: action.countdown, + disableClose: true + }) .afterClosed() .subscribe((result: string) => { if (result && result === "keep-logged") {