Fix crop cancel event handling
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 18 Dec 2024 10:12:34 +0000 (11:12 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Wed, 18 Dec 2024 10:30:34 +0000 (11:30 +0100)
ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js

index 724d6fd748d943f30f509e374d84c59e92a332e8..d25c8a0201a53bc5be26b2832befffd1e5067e39 100644 (file)
@@ -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);
     });
   }
 
index f32fe5bbc949c3165b596c3ff5c88f53b6998fc6..60a25403aea8db8d9023095466dbbed6fe4fe25a 100644 (file)
@@ -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) {