Skip to content

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

@RayGuo-ergou

Description

@RayGuo-ergou

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.

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