Can not prevent click transmitted to the outside #9312
-
Vue version3.3.4 Link to minimal reproductionhttps://stackblitz.com/edit/vue-jgdpok Steps to reproduceyou click on the first "click me", you will see counter increase 2 (event trigger 2 times) What is expected?it is a feature or a bug? if it is a feature, how can I prevent it? In my case, I can not block click inside the component, I have to block the event where it is declared What is actually happening?Click event auto trigger @click System InfoNo response Any additional comments?No response |
Beta Was this translation helpful? Give feedback.
Answered by
yanghoxom
Sep 29, 2023
Replies: 1 comment 6 replies
-
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@posva thank you for reply
another people gave me this link https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html
I think using it
emits: ['click']
makes more sense than having to use.capture
or blockinheritAttrs
and I think it's a more reasonable explanation that after moving to v3, events are automatically propagated out.