From eaa55e3f43fdb870cf5b2d99893b13d0d341532b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 11 Mar 2021 10:51:18 +0100 Subject: [PATCH] Do not use .bind() in Date/Picker.ts --- ts/WoltLabSuite/Core/Date/Picker.ts | 2 +- wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/WoltLabSuite/Core/Date/Picker.ts b/ts/WoltLabSuite/Core/Date/Picker.ts index bfb1ca2f7a..b593e9c16c 100644 --- a/ts/WoltLabSuite/Core/Date/Picker.ts +++ b/ts/WoltLabSuite/Core/Date/Picker.ts @@ -794,7 +794,7 @@ const DatePicker = { if (!disableClear) { const button = document.createElement("a"); button.className = "inputSuffix button"; - button.addEventListener("click", this.clear.bind(this, element)); + button.addEventListener("click", () => this.clear(element)); if (isEmpty) { button.style.setProperty("visibility", "hidden", ""); } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js index 4b81eed993..2e09cb5133 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js @@ -661,7 +661,7 @@ define(["require", "exports", "tslib", "../Core", "./Util", "../Dom/Change/Liste if (!disableClear) { const button = document.createElement("a"); button.className = "inputSuffix button"; - button.addEventListener("click", this.clear.bind(this, element)); + button.addEventListener("click", () => this.clear(element)); if (isEmpty) { button.style.setProperty("visibility", "hidden", ""); } -- 2.20.1