From 5d9b9a40acaa91babe2e108465ba162b92c3ed67 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 18 Dec 2024 11:12:34 +0100 Subject: [PATCH] Fix crop cancel event handling --- .../Core/Form/Builder/Field/Controller/FileProcessor.ts | 2 +- .../Core/Form/Builder/Field/Controller/FileProcessor.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts index 724d6fd748..d25c8a0201 100644 --- a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts +++ b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts @@ -234,7 +234,7 @@ export class FileProcessor { }).then(() => { this.#uploadResolve = undefined; this.#uploadButton.dataset.context = oldContext; - this.#fileInput.removeEventListener("cancel", cropCancelledEvent); + this.#uploadButton.removeEventListener("cancel", cropCancelledEvent); }); } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js index f32fe5bbc9..60a25403ae 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js @@ -179,7 +179,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Language", "WoltLabSui }).then(() => { this.#uploadResolve = undefined; this.#uploadButton.dataset.context = oldContext; - this.#fileInput.removeEventListener("cancel", cropCancelledEvent); + this.#uploadButton.removeEventListener("cancel", cropCancelledEvent); }); } #startReplaceFile(element) { -- 2.20.1