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

First enter doesn't trigger transition #3559

Closed
Leopoldthecoder opened this issue Aug 30, 2016 · 5 comments
Closed

First enter doesn't trigger transition #3559

Leopoldthecoder opened this issue Aug 30, 2016 · 5 comments

Comments

@Leopoldthecoder
Copy link

Vue.js version

2.0.0-rc.4

Reproduction Link

https://jsfiddle.net/uur9e91L/1/

Steps to reproduce

Click the toggle button

What is Expected?

On first click, the content fades in.

What is actually happening?

On first click, the content doesn't fade in. It only fades in/out on the following clicks.

This only happens when the content is controlled by both v-if and v-show. But in Vue 1.x, it works fine as shown in this demo

@fnlctrl
Copy link
Member

fnlctrl commented Aug 30, 2016

Using v-if and v-show at the same time is not supported in 2.0 Sorry, it was v-show+v-else that was not supported.

@fnlctrl fnlctrl closed this as completed Aug 30, 2016
@fnlctrl fnlctrl reopened this Aug 30, 2016
@fnlctrl
Copy link
Member

fnlctrl commented Aug 30, 2016

You need to use the appear prop, see #2873
https://jsfiddle.net/mLafkom3/

@fnlctrl fnlctrl closed this as completed Aug 30, 2016
@Leopoldthecoder
Copy link
Author

Thanks.

@vuchl
Copy link
Contributor

vuchl commented Aug 30, 2016

Yeah this is pretty hidden in the docs: http://rc.vuejs.org/guide/transitions.html#Transitions-on-Initial-Render

@yyx990803
Copy link
Member

This is indeed a bug, fixed in commit referenced above.

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

No branches or pull requests

4 participants