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

this overwritten as component name in arguments of hoisted event handler #1390

Closed
Conduitry opened this issue Apr 30, 2018 · 5 comments · Fixed by #1392
Closed

this overwritten as component name in arguments of hoisted event handler #1390

Conduitry opened this issue Apr 30, 2018 · 5 comments · Fixed by #1392

Comments

@Conduitry
Copy link
Member

See 2.1.1 vs 2.2.0.

This might be as simple as wrapping this in a check for !this.shouldHoist, but not sure whether that's the best solution. Maybe we should instead make sure this.shouldHoist is false if this is one of the arguments to the handler?

cc @stalkerg

@Conduitry
Copy link
Member Author

I realised the other day that the 'is this a descendant of an each block or not?' test doesn't really make sense, since the component itself could be in an each block

@Rich-Harris Sooo ... what does this mean for what we want to do here? Are you suggesting that we always want to hoist event handlers (unless it's a custom element)?

@Rich-Harris
Copy link
Member

I think we should prefer hoisting, yeah. I think we probably only want to overwrite this if it's a custom event

@stalkerg
Copy link
Contributor

@Conduitry thanks for this issue, looks like my gitter doesn't work.

@Rich-Harris
Copy link
Member

@stalkerg mine too, I think it's broken 😱

@Rich-Harris
Copy link
Member

fixed in 2.4.1

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 a pull request may close this issue.

3 participants