From: Alexander Ebert Date: Wed, 3 May 2023 09:33:09 +0000 (+0200) Subject: Force a synchronous recalculation of the position X-Git-Tag: 6.0.0_Alpha_1~170 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=70e6b6ca0863c0e86519eaed1a8453352ea5c238;p=GitHub%2FWoltLab%2FWCF.git Force a synchronous recalculation of the position The inconsistent updates add a lot of visual noice when scrolling the page. --- diff --git a/ts/WoltLabSuite/Core/Date/Picker.ts b/ts/WoltLabSuite/Core/Date/Picker.ts index 0b0121023c..8966dba41c 100644 --- a/ts/WoltLabSuite/Core/Date/Picker.ts +++ b/ts/WoltLabSuite/Core/Date/Picker.ts @@ -329,7 +329,7 @@ function open(event: MouseEvent): void { UiAlignment.set(_datePicker!, _input!); }; _updatePosition(); - window.addEventListener("scroll", _updatePosition, { passive: true }); + window.addEventListener("scroll", _updatePosition, { passive: false }); _input.nextElementSibling!.setAttribute("aria-expanded", "true"); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js index 9f03db6b42..ac47aa04d5 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Date/Picker.js @@ -277,7 +277,7 @@ define(["require", "exports", "tslib", "../Core", "./Util", "../Dom/Change/Liste UiAlignment.set(_datePicker, _input); }; _updatePosition(); - window.addEventListener("scroll", _updatePosition, { passive: true }); + window.addEventListener("scroll", _updatePosition, { passive: false }); _input.nextElementSibling.setAttribute("aria-expanded", "true"); _focusTrap.activate(); }