activity recording runOutsideAngular

This commit is contained in:
Kyle Spearrin 2018-04-12 14:24:42 -04:00
parent f01b9e9632
commit 3c48f80861
1 changed files with 8 additions and 6 deletions

View File

@ -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') {