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

custom event emit by the v-if component yet trigger the v-else component listener #7294

Closed
Labels

Comments

@mqli
Copy link

mqli commented Dec 21, 2017

Version

2.5.13

Reproduction link

https://codepen.io/posva/pen/baeJzd?editors=1111

Steps to reproduce

define a custom component witch emit custom event;
use v-if v-else create 2 component instances;
on first instance use v-on listen the custom event, the second DONOT;
toggle the v-if condition;
emit the custom event on the second instance

What is expected?

the listener on the first instance not been triggered

What is actually happening?

the listener on the first instance been triggered

@posva
Copy link
Member

posva commented Dec 21, 2017

Replaced the repro with a correct one (use the non minified version it warns you about problems)
As a workaround for the moment, add a key attribute on the button 🙂

@posva posva added the bug label Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment