mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-18 23:50:23 +00:00
fix($animator): avoid completing the animation asynchronously unless CSS transtiions/animations are present
Closes #4023 Closes #3940
This commit is contained in:
parent
0d0330adc2
commit
2a63dfa6cc
2 changed files with 1 additions and 3 deletions
|
|
@ -481,7 +481,7 @@ angular.module('ngAnimate', ['ng'])
|
|||
//avoid calling done() since there is no need to remove any
|
||||
//data or className values since this happens earlier than that
|
||||
//and also use a timeout so that it won't be asynchronous
|
||||
$timeout(onComplete || noop, 0, false);
|
||||
onComplete && onComplete();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -503,7 +503,6 @@ describe("ngAnimate", function() {
|
|||
element.addClass('ng-hide');
|
||||
expect(element).toBeHidden();
|
||||
$animate.removeClass(element, 'ng-hide');
|
||||
$timeout.flush();
|
||||
expect(element).toBeShown();
|
||||
}));
|
||||
|
||||
|
|
@ -554,7 +553,6 @@ describe("ngAnimate", function() {
|
|||
element.addClass('ng-hide');
|
||||
expect(element).toBeHidden();
|
||||
$animate.removeClass(element, 'ng-hide');
|
||||
$timeout.flush();
|
||||
expect(element).toBeShown();
|
||||
|
||||
$animate.enabled(true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue