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;