Fix the position of immovable menus on scroll 6.0
authorAlexander Ebert <ebert@woltlab.com>
Thu, 21 Nov 2024 10:52:12 +0000 (11:52 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 21 Nov 2024 10:52:12 +0000 (11:52 +0100)
See https://www.woltlab.com/community/thread/308886-dropdownignorepagescroll-bei-uisearchinput-l%C3%A4sst-dropdown-mit-ergebnissen-mitscr/

ts/WoltLabSuite/Core/Ui/Dropdown/Simple.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Dropdown/Simple.js

index 8d1ba020ee401a22b890c8e0cb059ec049c1d660..496582a0ab54b96ed7d75d0418e2956560896ae4 100644 (file)
@@ -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)!);
         }
       }
     }
index 0b3fdc65aa4051b1e83320e11b15738f3da76504..33adc89af28bcdd0d69998b98644873e42717a6c 100644 (file)
@@ -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));
+                    }
                 }
             }
         });