Skip to content

Scoped slots close action breaks modal #424

Closed
@angelinanikolaeva

Description

@angelinanikolaeva

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions