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

ngAnimate leaves elements in DOM for a strange amount of time #6748

Closed
kamilkp opened this issue Mar 19, 2014 · 6 comments
Closed

ngAnimate leaves elements in DOM for a strange amount of time #6748

kamilkp opened this issue Mar 19, 2014 · 6 comments

Comments

@kamilkp
Copy link
Contributor

kamilkp commented Mar 19, 2014

Example fiddle here: http://jsfiddle.net/Ttj24/2/
Try pressing enter several times (or any other keyboard key) whilst having focus on the input. On each keydown I clear the ngRepeat array, and append two elements to it.

After you run the fiddle, every keydown on the aforementioned input adds two new ngRepeat elements. After about 6 seconds if I hit another (e.g.) enter key in that input all of the elements except the first two disappear (after 0.27s which is related to #6747). After that every enter adds two elements and removes as expected.

If you change the transition duration on .anim to e.g. 0.5s like this (and then rerun the fiddle):

.anim.ng-enter{
    transition: all 0.5s ease;
}

the 6 seconds I wrote becomes about 3 minutes or more.

@matsko
Copy link
Contributor

matsko commented Mar 19, 2014

Thanks @kamilkp for brining this up. I think there are two other similar issues, but the JSFiddle link you provided is an excellent testing demo for me to figure this out. I'm looking at this today.

@matsko matsko self-assigned this Mar 19, 2014
@lefos987 lefos987 added this to the 1.3.0 milestone Mar 20, 2014
matsko added a commit to matsko/angular.js that referenced this issue Mar 21, 2014
matsko added a commit to matsko/angular.js that referenced this issue Mar 21, 2014
matsko added a commit to matsko/angular.js that referenced this issue Mar 21, 2014
@matsko
Copy link
Contributor

matsko commented Mar 21, 2014

Fixed: http://jsfiddle.net/Ttj24/3/

@matsko
Copy link
Contributor

matsko commented Mar 21, 2014

Keep in mind that your .repeater class doesn't actually do any animating. But either way that isn't the bug that was causing the elements to stay on the page. That bug was something else in ngAnimate and has been fixed in #6793.

@kamilkp
Copy link
Contributor Author

kamilkp commented Mar 21, 2014

Is this PR going tor merged in the 1.2.x branch? I need IE 8 support in my app so I don't want to switch to 1.3.

@matsko
Copy link
Contributor

matsko commented Mar 21, 2014

@kamilkp yes.

matsko added a commit to matsko/angular.js that referenced this issue Mar 28, 2014
@matsko matsko closed this as completed in ff5cf73 Mar 28, 2014
@matsko
Copy link
Contributor

matsko commented Mar 28, 2014

@kamilkp merged into master and the 1.2.x branch.

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