From: Matthias Schmidt Date: Sun, 3 Jan 2021 15:24:18 +0000 (+0100) Subject: Fix inserting newly creating list in `Ui/Search/Input` X-Git-Tag: 5.4.0_Alpha_1~492 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3856b739bbbcf623dda99d66408ec7ecb02e8578;p=GitHub%2FWoltLab%2FWCF.git Fix inserting newly creating list in `Ui/Search/Input` --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Input.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Input.js index 6a9257fed3..e81886d67f 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Input.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Input.js @@ -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); diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts index f937cd71ed..934ef2fe81 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts @@ -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);