From 3c48f80861b73343e0a28a3239f3188c7e44f2e5 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 12 Apr 2018 14:24:42 -0400 Subject: [PATCH] activity recording runOutsideAngular --- src/popup/app.component.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/popup/app.component.ts b/src/popup/app.component.ts index 16103f44d5..00361a58ab 100644 --- a/src/popup/app.component.ts +++ b/src/popup/app.component.ts @@ -65,12 +65,14 @@ export class AppComponent implements OnInit { private changeDetectorRef: ChangeDetectorRef, private ngZone: NgZone) { } ngOnInit() { - 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.ngZone.runOutsideAngular(() => { + 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 as any).bitwardenPopupMainMessageListener = async (msg: any, sender: any, sendResponse: any) => { if (msg.command === 'doneLoggingOut') {