fix: modal shift on close + readd settings preload (#6448)

* fix: NewModal layout shift on close

* fix: preload queries in settings modals

* fix: any
This commit is contained in:
Calum H.
2026-06-19 20:23:35 +00:00
committed by GitHub
parent ac5daad280
commit 56536abb24
9 changed files with 178 additions and 91 deletions
@@ -268,6 +268,7 @@ function hide() {
return
}
props.onHide?.()
resetMousePosition()
visible.value = false
popModal()
if (modalStackSize() === 0) {
@@ -309,6 +310,11 @@ function updateMousePosition(event: { clientX: number; clientY: number }) {
mouseY.value = event.clientY
}
function resetMousePosition() {
mouseX.value = Math.round(window.innerWidth / 2)
mouseY.value = Math.round(window.innerHeight / 2)
}
onUnmounted(() => {
if (open.value) {
popModal()
@@ -325,8 +331,6 @@ function handleWindowKeyDown(event: KeyboardEvent) {
if (props.closeOnEsc && event.key === 'Escape' && props.closable) {
if (!isTopmostModal()) return
hide()
mouseX.value = Math.round(window.innerWidth / 2)
mouseY.value = Math.round(window.innerHeight / 2)
}
}