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

fix($animateCss): remove animation end event listeners on close #13461

Merged
merged 1 commit into from
Dec 10, 2015

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented Dec 7, 2015

Previously the transition/animation end events were not removed when the
animation was closed. This normally didn't matter, because
the close function knows the animation are closed and won't do work
twice.
However, the listeners themselves do computation that could fail when
the event was missing some data, for example when the event was
triggered instead of natural.

Closes #10387

@Narretz
Copy link
Contributor Author

Narretz commented Dec 7, 2015

That isn't good enough, actually. The listeners should be removed inside the close fn, because that is called in at least the following cases: normal end, closing timeout, cancel

Now it's good enough!

@Narretz Narretz force-pushed the fix-animate-endevent-10387 branch from 7b50582 to ae932a4 Compare December 7, 2015 22:16
@Narretz Narretz force-pushed the fix-animate-endevent-10387 branch from ae932a4 to 970e71b Compare December 8, 2015 11:55
@matsko
Copy link
Contributor

matsko commented Dec 9, 2015

This looks really good. Please fix up the PR with the spy changes and let's get this green and merge it in.

@petebacondarwin petebacondarwin modified the milestones: 1.5.0-rc.0, 1.5.0-rc.1 Dec 9, 2015
@Narretz
Copy link
Contributor Author

Narretz commented Dec 9, 2015

Thanks for the review. The changes simplfy the code quite a bit! I've also added an expect to see if the on/off calls match transition/animation-end. That way I caught a bug in test - the closing test didn't actually test for animationend.

I will squash the commits if it LGTY.

@Narretz Narretz force-pushed the fix-animate-endevent-10387 branch from 4dada5c to 9c0fbe8 Compare December 9, 2015 23:20
Previously the transition/animation end events were not removed when the
animation was closed. This normally didn't matter, because
the close function knows the animations are closed and won't do work
twice.
However, the listeners themselves do computation that could fail when
the event was missing some data, for example when the event was
triggered instead of natural.

Closes angular#10387
@Narretz Narretz force-pushed the fix-animate-endevent-10387 branch from 9c0fbe8 to 20604e7 Compare December 10, 2015 13:04
@Narretz Narretz merged commit 20604e7 into angular:master Dec 10, 2015
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.

Angular-animate.js / onAnimationProgress(event) function null error IE
4 participants