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

Fix inline statement propagation #2102

Merged
merged 2 commits into from Jan 2, 2016

Conversation

rhyzx
Copy link

@rhyzx rhyzx commented Jan 1, 2016

When handle events by inline statement, propagation continuing is not working.

By the way: https://github.com/rhyzx/vue/blob/fix-inline-statement-propagation/test/unit/specs/api/events_spec.js#L186-L187 , binding handler using v-on directive to component will be treat as its inner handler, this is non-intuitive in my opinion, eg:

// parent.vue
<foo @test="stopPropagation"></foo>

test event dispatched by foo will still propagate even if stopPropagation returned false, what do you think about this? @yyx990803

yyx990803 added a commit that referenced this pull request Jan 2, 2016
@yyx990803 yyx990803 merged commit ab12c7b into vuejs:dev Jan 2, 2016
@yyx990803
Copy link
Member

After some investigation I'm starting to think that:

  1. inline v-on should not interfere with event flow;
  2. inline v-on should only be triggered by events emitted from that component only (i.e. not by dispatched or broadcasted events).

@yyx990803
Copy link
Member

... but these will be breaking changes. So I'll probably just make inline handlers behave as expected.

@rhyzx
Copy link
Author

rhyzx commented Jan 3, 2016

👍 rapid!

在 2016年1月3日,上午6:47,Evan You notifications@github.com 写道:

... but these will be breaking changes. So I'll probably just make inline handlers behave as expected.


Reply to this email directly or view it on GitHub #2102 (comment).

@rhyzx
Copy link
Author

rhyzx commented Jan 3, 2016

Agreed, those can be introduced in next major release.

在 2016年1月3日,上午6:22,Evan You <notifications@github.com mailto:notifications@github.com> 写道:

After some investigation I'm starting to think that:

inline v-on should not interfere with event flow;
inline v-on should only be triggered by events emitted from that component only (i.e. not by dispatched or broadcasted events).

Reply to this email directly or view it on GitHub #2102 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants