-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Function wiring breaks for components that show/hide slot content using v-if #3518
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
Comments
The problem is that you are using v-if on component's root element inside its template. I guess vue should prohibit using v-if on component's root element.. |
Unfortunately, using |
Using I would rather: if the popup component will have its own controls, i.e. a close button, This has several advantages:
|
Closing this because #3455 takes care of this. |
@LinusBorg The reproduction is already using rc.3, which was supposed to fix #3455 (release notes https://github.com/vuejs/vue/releases/tag/v2.0.0-rc.3), so I guess there's still some edge case not covered. |
wait, isn't it invalid component, as |
@prog-rajkamal That is a valid point which @fnlctrl also mentioned in his first response. However, the bug still occurs if I move |
Vue.js version
2.0.0-rc.3
Reproduction Link
http://codepen.io/analog-nico/pen/dXBRBG
Steps to reproduce
What is Expected?
What is actually happening?
closePopupUsingVIf
function attached to the "Close" link's click event never gets called.For reference the codepen contains the exact same implementation of the popup with the only difference that it uses
v-show
instead ofv-if
to show/hide the popup.v-show
works perfectly.The text was updated successfully, but these errors were encountered: