From 9334f285b7a80850ffef8c43a2a0897349fb238d Mon Sep 17 00:00:00 2001 From: David Straub Date: Tue, 29 Oct 2024 12:46:42 +0100 Subject: [PATCH] Fix issue with this binding --- src/GrampsJs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GrampsJs.js b/src/GrampsJs.js index bf22567c..3a98de9e 100644 --- a/src/GrampsJs.js +++ b/src/GrampsJs.js @@ -605,7 +605,9 @@ export class GrampsJs extends LitElement { window.addEventListener('db:changed', () => this._loadDbInfo(false)) this.addEventListener('drawer:toggle', this._toggleDrawer) window.addEventListener('keydown', event => this._handleKey(event)) - document.addEventListener('visibilitychange', this._handleVisibilityChange) + document.addEventListener('visibilitychange', () => + this._handleVisibilityChange() + ) window.addEventListener('online', () => this._handleOnline()) window.addEventListener('token:refresh', () => this._handleRefresh())