From: Alexander Ebert Date: Wed, 22 Dec 2021 14:07:29 +0000 (+0100) Subject: Improper restore of navigation menu icons X-Git-Tag: 5.4.10_dev_2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29dac802213bd4361e3ed27a2abb73854f1f42f7;p=GitHub%2FWoltLab%2FWCF.git Improper restore of navigation menu icons --- diff --git a/ts/WoltLabSuite/Core/Ui/Page/Menu/Main.ts b/ts/WoltLabSuite/Core/Ui/Page/Menu/Main.ts index 68194d366c..74e3b85147 100644 --- a/ts/WoltLabSuite/Core/Ui/Page/Menu/Main.ts +++ b/ts/WoltLabSuite/Core/Ui/Page/Menu/Main.ts @@ -82,6 +82,8 @@ class UiPageMenuMain extends UiPageMenuAbstract { let item = this.title.nextElementSibling; while (item && item.classList.contains("menuOverlayItemOption")) { + const nextSibling = item.nextElementSibling; + item.classList.remove("menuOverlayItem", "menuOverlayItemOption"); item.removeEventListener("click", (ev) => { ev.stopPropagation(); @@ -96,9 +98,9 @@ class UiPageMenuMain extends UiPageMenuAbstract { link.children[1].classList.add("invisible"); link.children[1].classList.remove("menuOverlayItemTitle"); - this.navigationList.appendChild(item); + this.navigationList.prepend(item); - item = item.nextElementSibling; + item = nextSibling; } } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js index 6ce989588b..f4092e97dd 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js @@ -64,6 +64,7 @@ define(["require", "exports", "tslib", "../../../Core", "../../../Dom/Util", ".. Util_1.default.hide(this.title); let item = this.title.nextElementSibling; while (item && item.classList.contains("menuOverlayItemOption")) { + const nextSibling = item.nextElementSibling; item.classList.remove("menuOverlayItem", "menuOverlayItemOption"); item.removeEventListener("click", (ev) => { ev.stopPropagation(); @@ -74,8 +75,8 @@ define(["require", "exports", "tslib", "../../../Core", "../../../Dom/Util", ".. link.classList.remove("box24"); link.children[1].classList.add("invisible"); link.children[1].classList.remove("menuOverlayItemTitle"); - this.navigationList.appendChild(item); - item = item.nextElementSibling; + this.navigationList.prepend(item); + item = nextSibling; } } return true;