Repository navigation
fix(positioning): wait for animation to complete - #1595
Conversation
|
Thanks @darrinholst, any chance you could update the plunkr in the linked issue with your fixed version of |
|
It's been updated. http://plnkr.co/edit/MciJN9nVXf8lZIuOM0wj?p=preview |
|
Cheers @darrinholst The only thing I noticed is that when you click out from an "up" dropdown, it flickers the dropdown in the "down" position before the dropdown disappears. (Chrome) This doesn't happen without ngAnimate, any chance you might be able to look into it? Thanks for the work so far :) |
|
Yep, I noticed that too, but it feels like a separate issue than positioning not working. I can look into it, but I feel like it shouldn't hold up this fix. Thoughts? |
|
Hmm ok. I wonder, does #1594 help at all? |
|
I'll review this in more depth and test locally along with #1594 and hopefully get them merged in soon. Thanks for your work. |
When calculating the dropdown position the height of the dropdown needs to be known. When using ngAnimate the animation has not finished by the time the height calculation is needed. This fix extracts the positioning calculation out to a function that is called after animation is done (or immediately when animation is not in use). Fixes #1593.
When the dropdown is in an up position and it is closed we were removing the positioning before hiding it which caused a flicker while it moved down to it's natural bottom position. This change sets the opacity to 0 before resetting the positioning style attributes.
|
#1594 didn't help the flicker when closing the dropdown. I fixed it in this branch though. Plunkr has been updated. |
When calculating the dropdown position the height of the dropdown
needs to be known. When using ngAnimate the animation has not
finished by the time the height calculation is needed. This fix
extracts the positioning calculation out to a function that is
called after animation is done (or immediately when animation is
not in use).
Fixes #1593.