vue-final/vue-final-modal

Scoped slots close action breaks modal

angelinanikolaeva opened this issue · 1 comments

Version

vue-final-modal: 4.5.3
vue: 3.3.8
nuxt: 3.8.1

OS

Windows

Reproduction Link

https://stackblitz.com/edit/github-jd9emd?file=src%2Fcomponents%2FMyModal.vue

Steps to reproduce

Use scoped slots with close action in any modal like this:

<VueFinalModal>
  <template #default="{ close }">
    <button @click="() => close()">
      Cancel
    </button>
  </template>
</VueFinalModal>

What is Expected?

The modal works after closing it from inside using scoped slots

What is actually happening?

When the modal is opened, a click on the close button from scoped slots closes it like it shoud, but the modal won't open again.
If clicked on modal overlay, everything works fine. Usage of @click="emit('update:modelValue', false)" instead of slots also works

Should be fixed in v4.5.4