Missed the removes

also fix more indenting
This commit is contained in:
David Baker 2019-03-08 21:51:14 +00:00
parent b404d21bba
commit 999ebe6a19

View file

@ -131,11 +131,12 @@ export default class UserActivity {
* Stop tracking user activity * Stop tracking user activity
*/ */
stop() { stop() {
this._document.onmousedown = undefined; this._document.removeEventListener('mousedown', this._onUserActivity);
this._document.onmousemove = undefined; this._document.removeEventListener('mousemove', this._onUserActivity);
this._document.onkeydown = undefined; this._document.removeEventListener('keydown', this._onUserActivity);
this._window.removeEventListener('wheel', this._onUserActivity, this._window.removeEventListener('wheel', this._onUserActivity, {
{ passive: true, capture: true }); passive: true, capture: true,
});
this._document.removeEventListener("visibilitychange", this._onPageVisibilityChanged); this._document.removeEventListener("visibilitychange", this._onPageVisibilityChanged);
this._window.removeEventListener("blur", this._onWindowBlurred); this._window.removeEventListener("blur", this._onWindowBlurred);