Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngAnimate): fix property name that is used to calculate cache key #7566

Closed
wants to merge 1 commit into from

Conversation

4vanger
Copy link

@4vanger 4vanger commented May 23, 2014

Request Type: bug

How to reproduce: I met this issue in an huge screen so I cannot provide a use case.

Component(s): ngAnimate

Impact: small

Complexity: small

This issue is related to:

Detailed Description:

Problem occured when there was 2 ng-hide/ng-show on a page - one had animation assigned and other doesn't. If second item (without animation) is shown/hidden first - then due to this but it get incorrect cache key assigned and it was the same for second animation - so second animation was not animated because it used wrong cacheKey to extract cached timings for non-animated element.

Other Comments:

Fix property name that introduced a bug that occurs when there are 2 animations per page with similar signature. Due to mistype they were assigned same cache key so second animation was processed incorrectly
@mary-poppins
Copy link

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#7566)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@mary-poppins
Copy link

I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS.

Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match.

If you signed the CLA as a corporation, please let us know the company's name.

Thanks a bunch!

PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

@4vanger 4vanger added cla: no and removed cla: yes labels May 23, 2014
@4vanger
Copy link
Author

4vanger commented May 26, 2014

I've subscribed CLA 2 days ago but PR still not updated - can you check it please?

@mary-poppins
Copy link

CLA signature verified! Thank you!

Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes).

@4vanger 4vanger added cla: yes and removed cla: no labels May 28, 2014
@caitp
Copy link
Contributor

caitp commented May 28, 2014

@4vanger could you please write a test case that fails without this change and add it to test/ngAnimate/animateSpec.js ? thanks!

@matsko this looks correct (based on https://github.com/angular/angular.js/blob/master/src/ngAnimate/animate.js#L1346) --- can you verify and merge this after there is a test case added?

@caitp caitp added this to the 1.3.0-beta.11 milestone May 28, 2014
@matsko
Copy link
Contributor

matsko commented May 28, 2014

@4vanger can you post your example to Plunkr so I can put together a test for this?

@caitp
Copy link
Contributor

caitp commented May 28, 2014

The issue seems to be that you don't get "ng-animate ng-hide-add" classes added (in the case of ng-show/hide) --- small example at http://plnkr.co/edit/96ftv9oLnMTxkllQXlre?p=preview

It doesn't really break the animation, so still waiting on a reproduction about that. But yeah you probably want those classes to be set

@4vanger
Copy link
Author

4vanger commented May 29, 2014

Huh, it took a while to make it simple: http://plnkr.co/edit/4V8UO2wLVFFymAxh0liw
comment line 28 to make this example behave correctly

matsko pushed a commit to matsko/angular.js that referenced this pull request May 30, 2014
Fix property name that introduced a bug that occurs when there are 2 animations per page
with similar signature. Due to mistype they were assigned same cache key so second
animation was processed incorrectly

Closes angular#7566
@matsko
Copy link
Contributor

matsko commented May 30, 2014

@caitp can you review this? matsko@c016703

@caitp
Copy link
Contributor

caitp commented May 30, 2014

@matsko LGTM

@matsko matsko closed this in 9f5c437 May 30, 2014
@matsko
Copy link
Contributor

matsko commented May 30, 2014

MERGED

@caitp
Copy link
Contributor

caitp commented May 30, 2014

🎊

@matsko
Copy link
Contributor

matsko commented May 30, 2014

@4vanger thanks for finding the bug and for fixing this! @caitp thanks for looking into the issue and for the review.

@matsko
Copy link
Contributor

matsko commented May 30, 2014

PS. This issue does not exist at all on the 1.2.x branch. So no need to merge there.

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

Successfully merging this pull request may close these issues.

4 participants