Commit f8e6a4b
committed
fix(ngAnimate): remove event listeners only after all listeners have been called
The fix for removing the event callbacks on destroy introduced in
ce7f400 removed the events too early, so that the event callbacks
for the "close" phase in "leave" animations were not called.
This commit fixes the behavior so that the event callbacks are only removed during on('$destroy')
when no animation is currently active on the element. When an animation is active, the event callbacks
will be removed after all callbacks have run, and if the element has no parent (has been removed from
the DOM).
Closes angular#143211 parent ea4120b commit f8e6a4b
File tree
2 files changed
+248
-114
lines changed- src/ngAnimate
- test/ngAnimate
2 files changed
+248
-114
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
211 | 219 | | |
212 | 220 | | |
213 | 221 | | |
| |||
219 | 227 | | |
220 | 228 | | |
221 | 229 | | |
222 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
223 | 238 | | |
224 | 239 | | |
225 | 240 | | |
| |||
552 | 567 | | |
553 | 568 | | |
554 | 569 | | |
| 570 | + | |
555 | 571 | | |
| 572 | + | |
| 573 | + | |
556 | 574 | | |
557 | 575 | | |
558 | 576 | | |
| |||
0 commit comments