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

Scoped slots close action breaks modal #424

Closed
angelinanikolaeva opened this issue Jan 20, 2024 · 1 comment · Fixed by #430
Closed

Scoped slots close action breaks modal #424

angelinanikolaeva opened this issue Jan 20, 2024 · 1 comment · Fixed by #430
Assignees
Labels
bug Something isn't working

Comments

@angelinanikolaeva
Copy link

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

@angelinanikolaeva angelinanikolaeva added the bug Something isn't working label Jan 20, 2024
RomainMazB added a commit to RomainMazB/vue-final-modal that referenced this issue Feb 5, 2024
RomainMazB added a commit to RomainMazB/vue-final-modal that referenced this issue Feb 5, 2024
hunterliu1003 added a commit that referenced this issue Feb 14, 2024
@hunterliu1003 hunterliu1003 mentioned this issue Feb 14, 2024
@hunterliu1003
Copy link
Member

Should be fixed in v4.5.4

hunterliu1003 added a commit that referenced this issue Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants