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

[Bug]: Dialog emit emit 2x times #1089

Closed
RayGuo-ergou opened this issue Jul 3, 2024 · 0 comments · Fixed by #1091
Closed

[Bug]: Dialog emit emit 2x times #1089

RayGuo-ergou opened this issue Jul 3, 2024 · 0 comments · Fixed by #1091
Assignees
Labels
bug Something isn't working

Comments

@RayGuo-ergou
Copy link
Contributor

RayGuo-ergou commented Jul 3, 2024

Environment

Developement/Production OS: Ubuntu 22.04
Node version: 20.0.0
Package manager: pnpm@9.4.0
Radix Vue version: 1.8.5
Vue version: 3.4.31
CSS framework: none

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-m19bfk

Steps to reproduce

Open then close the dialog, the close print twice in console.

Btw 4 open events triggered in the reproduction when open the dialog at first time but in my project it's triggered 4 times when I opened a dialog with a form everytime. Not sure what's the condition of that event.

Image below is the console of reproduction.

image

Describe the bug

The events ( at least close trigger two times)

Expected behavior

Only trigger once.

Context & Screenshots (if applicable)

Had a quick look I found here:

https://github.com/radix-vue/radix-vue/blob/1866a346571fdf0695ecd58a539b72258076e1d4/packages/radix-vue/src/Dialog/DialogContentModal.vue#L19
https://github.com/radix-vue/radix-vue/blob/1866a346571fdf0695ecd58a539b72258076e1d4/packages/radix-vue/src/Dialog/DialogContentImpl.vue#L8-L19

Already pass the events as props however it's defined again below

https://github.com/radix-vue/radix-vue/blob/1866a346571fdf0695ecd58a539b72258076e1d4/packages/radix-vue/src/Dialog/DialogContentModal.vue#L23-L31

Not sure if this intended.

@RayGuo-ergou RayGuo-ergou added the bug Something isn't working label Jul 3, 2024
@zernonia zernonia self-assigned this Jul 3, 2024
@zernonia zernonia linked a pull request Jul 3, 2024 that will close this issue
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