Fixes the problem that the DOM element was not removed when the file was deleted
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 26 Jun 2024 08:17:06 +0000 (10:17 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Wed, 26 Jun 2024 08:17:06 +0000 (10:17 +0200)
ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js

index 2236967643b7bb57c255e4825a4bad2efa116ed4..c459c2c53aeddc6cc6a472f6643a8988e5825cc9 100644 (file)
@@ -190,7 +190,7 @@ export class FileProcessor {
     if (this.showBigPreview) {
       element.parentElement!.innerHTML = "";
     } else {
-      element.parentElement!.remove();
+      element.parentElement!.parentElement!.remove();
     }
   }
 
index a8949c2751d141dadf3a5e02d30a3f9bb08cdfd2..534125021a369da97ef4e079b56d100f4486e487 100644 (file)
@@ -153,7 +153,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Language", "WoltLabSui
                 element.parentElement.innerHTML = "";
             }
             else {
-                element.parentElement.remove();
+                element.parentElement.parentElement.remove();
             }
         }
         async #registerFile(element, container = null) {