From 6bde3ba28178bf26225e6cc8ac5a2d7d07b1dc41 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Wed, 21 Aug 2024 09:33:53 +0200 Subject: [PATCH] The input field no longer exists in the shadow root See https://github.com/WoltLab/WCF/commit/bfcc65cb800b85fdede8b0c7cf59b9fc56b7eab0 See https://www.woltlab.com/community/thread/307810-plugin-icon-verschwindet-bei-bearbeitung-eines-plugins-im-store/ --- .../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 42ec8fd86d..fef5939cb0 100644 --- a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts +++ b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts @@ -61,7 +61,7 @@ export class FileProcessor { this.#registerFile(event.detail); }); - this.#fileInput = this.#uploadButton.shadowRoot!.querySelector('input[type="file"]')!; + this.#fileInput = this.#uploadButton.querySelector('input[type="file"]')!; this.#container.querySelectorAll("woltlab-core-file").forEach((element) => { this.#registerFile(element, element.parentElement); 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 a66a36cb53..2e40933355 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 @@ -36,7 +36,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Language", "WoltLabSui } this.#registerFile(event.detail); }); - this.#fileInput = this.#uploadButton.shadowRoot.querySelector('input[type="file"]'); + this.#fileInput = this.#uploadButton.querySelector('input[type="file"]'); this.#container.querySelectorAll("woltlab-core-file").forEach((element) => { this.#registerFile(element, element.parentElement); }); -- 2.20.1