Skip to content

Fix using one delay to control all transitions. #3932

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

Merged
merged 2 commits into from
Oct 17, 2016

Conversation

guidobouman
Copy link
Contributor

Vue transitions have a wrong timing when having CSS like the following:

.[transition-name]-enter-active, .[transition-name]-leave-active {
  transition: opacity 0.8s ease, transform 0.7s ease;
  transition-delay: 0.4s;
}

Which in turn bubbles errors to the console. This PR fixes the bug.

I have a question though: Is parameter re-assign allowed in Vue? It's not configured in the ESlint setup.

guidobouman and others added 2 commits October 13, 2016 11:48
Vue transitions have wrong timing when having CSS like the following:

```
.[transition-name]-enter-active, .[transition-name]-leave-active {
  transition: opacity 0.8s ease, transform 0.7s ease;
  transition-delay: 0.4s;
}
```

Which in turn bubbles errors to the console.
@guidobouman
Copy link
Contributor Author

Also, where'd I put a test for this? I assume after custom-transition-classes in test/unit/features/transition/transition.spec.js?

And should this actually be tested? As this seems like a niche thing to test.

@yyx990803
Copy link
Member

Yeah, looks quite a niche to test. Could you please provide a fiddle so that I can confirm it though?

@guidobouman
Copy link
Contributor Author

@guidobouman
Copy link
Contributor Author

guidobouman commented Oct 13, 2016

By the way: delays is never an empty array, so concat() can't end up in an infinite loop.

To be sure we could add a fallback like delays = delays.concat(delays || '0s') But that would mean we need to know the syntax of a delay inside the function, which could cause issues when a browser decides to change the syntax.

@guidobouman
Copy link
Contributor Author

@yyx990803 This should be mergeable, right?

@yyx990803 yyx990803 merged commit 8ba420c into vuejs:dev Oct 17, 2016
@yyx990803
Copy link
Member

Thanks!

@guidobouman guidobouman deleted the patch-1 branch October 17, 2016 07:06
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.

2 participants