From 00f84313f328668bf28cb01976c7119344033067 Mon Sep 17 00:00:00 2001 From: mister-ben <1676039+mister-ben@users.noreply.github.com> Date: Thu, 11 Jul 2024 22:03:00 +0200 Subject: [PATCH] fix: ensure transient button event listeners are removed on dispose --- src/js/transient-button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/transient-button.js b/src/js/transient-button.js index 08da37a419..bc1c85ef96 100644 --- a/src/js/transient-button.js +++ b/src/js/transient-button.js @@ -53,7 +53,7 @@ class TransientButton extends Button { // When shown, the float button will be visible even if the user is inactive. // Clear this if there is any interaction. - player.on(['useractive', 'userinactive'], (e) => { + this.on(this.player_, ['useractive', 'userinactive'], (e) => { this.removeClass('force-display'); }); }