From 999ebe6a19a1e0fff5d6affc6b4a42f94cdc47e2 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 8 Mar 2019 21:51:14 +0000 Subject: [PATCH] Missed the removes also fix more indenting --- src/UserActivity.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/UserActivity.js b/src/UserActivity.js index c556be8091..3a5880210f 100644 --- a/src/UserActivity.js +++ b/src/UserActivity.js @@ -131,11 +131,12 @@ export default class UserActivity { * Stop tracking user activity */ stop() { - this._document.onmousedown = undefined; - this._document.onmousemove = undefined; - this._document.onkeydown = undefined; - this._window.removeEventListener('wheel', this._onUserActivity, - { passive: true, capture: true }); + this._document.removeEventListener('mousedown', this._onUserActivity); + this._document.removeEventListener('mousemove', this._onUserActivity); + this._document.removeEventListener('keydown', this._onUserActivity); + this._window.removeEventListener('wheel', this._onUserActivity, { + passive: true, capture: true, + }); this._document.removeEventListener("visibilitychange", this._onPageVisibilityChanged); this._window.removeEventListener("blur", this._onWindowBlurred);