From 3856b739bbbcf623dda99d66408ec7ecb02e8578 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 3 Jan 2021 16:24:18 +0100 Subject: [PATCH] Fix inserting newly creating list in `Ui/Search/Input` --- wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Input.js | 2 +- wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Search/Input.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.20.1