From 46c8fd5178d6028d88fbf66046a4de8f4bf17882 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:21:02 +0100 Subject: [PATCH] Fix breaking old menu position --- web/scripts/ui.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/scripts/ui.js b/web/scripts/ui.js index e1f3f459e..87b4887eb 100644 --- a/web/scripts/ui.js +++ b/web/scripts/ui.js @@ -107,6 +107,8 @@ function dragElement(dragEl, settings) { } function positionElement() { + if(dragEl.style.display === "none") return; + const halfWidth = document.body.clientWidth / 2; const anchorRight = newPosX + dragEl.clientWidth / 2 > halfWidth;