From 011b4e344ed450767e99b9d7436b48a7bf906813 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 12 Apr 2018 14:38:41 -0400 Subject: [PATCH] run activity recording outside angular --- jslib | 2 +- src/app/app.component.ts | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/jslib b/jslib index 7933746d82..7bc65b8366 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 7933746d822206d58ca852521dc59467af885239 +Subproject commit 7bc65b83667b0864af2b7aaf093ec611ecb625d8 diff --git a/src/app/app.component.ts b/src/app/app.component.ts index d59e1109f1..00a2f2747b 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -84,16 +84,18 @@ export class AppComponent implements OnInit { private messagingService: MessagingService) { } ngOnInit() { - setTimeout(async () => { - await this.updateAppMenu(); - }, 1000); + this.ngZone.runOutsideAngular(() => { + setTimeout(async () => { + await this.updateAppMenu(); + }, 1000); - window.onmousemove = () => this.recordActivity(); - window.onmousedown = () => this.recordActivity(); - window.ontouchstart = () => this.recordActivity(); - window.onclick = () => this.recordActivity(); - window.onscroll = () => this.recordActivity(); - window.onkeypress = () => this.recordActivity(); + window.onmousemove = () => this.recordActivity(); + window.onmousedown = () => this.recordActivity(); + window.ontouchstart = () => this.recordActivity(); + window.onclick = () => this.recordActivity(); + window.onscroll = () => this.recordActivity(); + window.onkeypress = () => this.recordActivity(); + }); this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => { this.ngZone.run(async () => {