Add the file after the upload button, as it is in the template
authorCyperghost <olaf_schmitz_1@t-online.de>
Fri, 8 Nov 2024 12:07:36 +0000 (13:07 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Fri, 8 Nov 2024 12:07:36 +0000 (13:07 +0100)
ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js

index fef5939cb0a2012b1bed402e9147d4e1dd7c8ead..0a55ad8202b132742a0f817bb222ff8929063cd2 100644 (file)
@@ -199,7 +199,7 @@ export class FileProcessor {
         if (container === null) {
           container = document.createElement("div");
           container.classList.add("fileUpload__preview");
-          this.#uploadButton.insertAdjacentElement("beforebegin", container);
+          this.#uploadButton.insertAdjacentElement("afterbegin", container);
         }
         container.append(element);
       } else {
index 2a6816322b035dcd424165feed7c62fa2d04e8b0..c08dbf919a4ffd64e4feee6d7354d3ed510e9e40 100644 (file)
@@ -152,7 +152,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Language", "WoltLabSui
                     if (container === null) {
                         container = document.createElement("div");
                         container.classList.add("fileUpload__preview");
-                        this.#uploadButton.insertAdjacentElement("beforebegin", container);
+                        this.#uploadButton.insertAdjacentElement("afterbegin", container);
                     }
                     container.append(element);
                 }