From 5a5c5b0b535abc5ce10fe630a21b307baf7f0a4a Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 26 Jun 2024 11:11:15 +0200 Subject: [PATCH] Set `bubbles` to `true` for the custom event `fileProcessorCustomAction`. --- .../Core/Form/Builder/Field/Controller/FileProcessor.ts | 7 ++++++- .../Core/Form/Builder/Field/Controller/FileProcessor.js | 5 ++++- 2 files changed, 10 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 14032d25e8..7f0253353c 100644 --- a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts +++ b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts @@ -85,7 +85,12 @@ export class FileProcessor { extraButton.innerHTML = button.icon; } extraButton.addEventListener("click", () => { - element.dispatchEvent(new CustomEvent("fileProcessorCustomAction", { detail: button.actionName })); + element.dispatchEvent( + new CustomEvent("fileProcessorCustomAction", { + detail: button.actionName, + bubbles: true, + }), + ); }); const listItem = document.createElement("li"); 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 e3d59923fc..756b1a7b80 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 @@ -63,7 +63,10 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Language", "WoltLabSui extraButton.innerHTML = button.icon; } extraButton.addEventListener("click", () => { - element.dispatchEvent(new CustomEvent("fileProcessorCustomAction", { detail: button.actionName })); + element.dispatchEvent(new CustomEvent("fileProcessorCustomAction", { + detail: button.actionName, + bubbles: true, + })); }); const listItem = document.createElement("li"); listItem.append(extraButton); -- 2.20.1