See https://www.woltlab.com/community/thread/307876-ge%C3%B6ffnetes-kontrollzentrum-verschiebt-sich-wenn-ich-das-fenster-kleiner-mache-au/
element.addEventListener("click", (event) => event.stopPropagation());
+ window.addEventListener(
+ "resize",
+ () => {
+ if (element.hidden) {
+ return;
+ }
+
+ setAlignment(element, button);
+ },
+ { passive: true },
+ );
+
button.addEventListener("click", (event) => {
event.preventDefault();
event.stopPropagation();
CloseOverlay_1.default.add("WoltLabSuite/Core/Ui/User/Menu/ControlPanel", () => close());
(0, Manager_1.getContainer)().append(element);
element.addEventListener("click", (event) => event.stopPropagation());
+ window.addEventListener("resize", () => {
+ if (element.hidden) {
+ return;
+ }
+ setAlignment(element, button);
+ }, { passive: true });
button.addEventListener("click", (event) => {
event.preventDefault();
event.stopPropagation();