From: Alexander Ebert Date: Thu, 21 Nov 2024 10:52:12 +0000 (+0100) Subject: Fix the position of immovable menus on scroll X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=74f1054c84b61f95f19be372e3fd0b19ff96350b;p=GitHub%2FWoltLab%2FWCF.git Fix the position of immovable menus on scroll See https://www.woltlab.com/community/thread/308886-dropdownignorepagescroll-bei-uisearchinput-l%C3%A4sst-dropdown-mit-ergebnissen-mitscr/ --- diff --git a/ts/WoltLabSuite/Core/Ui/Dropdown/Simple.ts b/ts/WoltLabSuite/Core/Ui/Dropdown/Simple.ts index 8d1ba020ee..496582a0ab 100644 --- a/ts/WoltLabSuite/Core/Ui/Dropdown/Simple.ts +++ b/ts/WoltLabSuite/Core/Ui/Dropdown/Simple.ts @@ -69,6 +69,8 @@ function onScroll() { const menu = _menus.get(dropdown.id) as HTMLElement; if (!Core.stringToBool(menu.dataset.dropdownIgnorePageScroll || "")) { UiDropdownSimple.close(containerId); + } else { + UiDropdownSimple.setAlignment(dropdown, _menus.get(containerId)!); } } } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js index 0b3fdc65aa..33adc89af2 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js @@ -67,6 +67,9 @@ define(["require", "exports", "tslib", "../../CallbackList", "../../Core", "../. if (!Core.stringToBool(menu.dataset.dropdownIgnorePageScroll || "")) { UiDropdownSimple.close(containerId); } + else { + UiDropdownSimple.setAlignment(dropdown, _menus.get(containerId)); + } } } });