Fix inserting newly creating list in `Ui/Search/Input`
authorMatthias Schmidt <gravatronics@live.com>
Sun, 3 Jan 2021 15:24:18 +0000 (16:24 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 3 Jan 2021 15:24:18 +0000 (16:24 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Input.js
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts

index 6a9257fed3b04e535232f5f53cc17a91ab6287e6..e81886d67f58cd1f2d6c13cc8025ef5b9a524933 100644 (file)
@@ -250,7 +250,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Core", "../../Dom/Ut
                 });
             }
             if (createdList) {
-                this.list.parentElement.insertBefore(this.element, this.list.nextSibling);
+                this.element.insertAdjacentElement("afterend", this.list);
                 const parent = this.element.parentElement;
                 Simple_1.default.initFragment(parent, this.list);
                 this.dropdownContainerId = Util_1.default.identify(parent);
index f937cd71ed1964f072a477b1df2fc3264964cdff..934ef2fe81b5ad265d5b6c581d9a8baf6d189a79 100644 (file)
@@ -299,7 +299,7 @@ class UiSearchInput {
     }
 
     if (createdList) {
-      this.list.parentElement!.insertBefore(this.element, this.list.nextSibling);
+      this.element.insertAdjacentElement("afterend", this.list);
       const parent = this.element.parentElement!;
       UiDropdownSimple.initFragment(parent, this.list);