prefect-design
prefect-design copied to clipboard
p-modal `auto-close` prop broken
First check
- [X] I added a descriptive title to this issue.
- [X] I used the GitHub search to find a similar issue and didn't find it.
- [X] I searched the Prefect documentation for this issue.
- [X] I checked that this issue is related to Prefect and not one of its dependencies.
Bug summary
when auto-close
prop is used, clicking outside of modal and using esc do not actually close the modal. Instead I get the error
Scripts may close only the windows that were opened by them.
It doesn't seem like auto-close
is used much, so not sure when it broke
Reproduction
my modal component
<script lang="ts" setup>
import { computed } from 'vue'
const props = defineProps<{
isOpen: boolean,
}>()
const emits = defineEmits<{
'update:isOpen': [value: boolean],
}>()
const isOpen = computed({
get() {
return props.isOpen
},
set(value) {
emits('update:isOpen', value)
},
})
</script>
<template>
<p-modal v-model:show-modal="isOpen" class="season-selection-modal" auto-close>
season-selection-modal
</p-modal>
</template>
Error
prefect-design.mjs:20377 Scripts may close only the windows that were opened by them.
Versions
"@prefecthq/prefect-design": "2.0.11",
Additional context
"vue": "^3.3.4", "vite": "^4.4.5", "vue-tsc": "^1.8.5"