Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p-modal auto-close prop broken #981

Open
4 tasks done
stackoverfloweth opened this issue Oct 5, 2023 · 0 comments
Open
4 tasks done

p-modal auto-close prop broken #981

stackoverfloweth opened this issue Oct 5, 2023 · 0 comments

Comments

@stackoverfloweth
Copy link
Contributor

First check

  • I added a descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Prefect documentation for this issue.
  • 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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant