mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-20 12:21:52 +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
|
//avoid calling done() since there is no need to remove any
|
||||||
//data or className values since this happens earlier than that
|
//data or className values since this happens earlier than that
|
||||||
//and also use a timeout so that it won't be asynchronous
|
//and also use a timeout so that it won't be asynchronous
|
||||||
$timeout(onComplete || noop, 0, false);
|
onComplete && onComplete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -503,7 +503,6 @@ describe("ngAnimate", function() {
|
||||||
element.addClass('ng-hide');
|
element.addClass('ng-hide');
|
||||||
expect(element).toBeHidden();
|
expect(element).toBeHidden();
|
||||||
$animate.removeClass(element, 'ng-hide');
|
$animate.removeClass(element, 'ng-hide');
|
||||||
$timeout.flush();
|
|
||||||
expect(element).toBeShown();
|
expect(element).toBeShown();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
@ -554,7 +553,6 @@ describe("ngAnimate", function() {
|
||||||
element.addClass('ng-hide');
|
element.addClass('ng-hide');
|
||||||
expect(element).toBeHidden();
|
expect(element).toBeHidden();
|
||||||
$animate.removeClass(element, 'ng-hide');
|
$animate.removeClass(element, 'ng-hide');
|
||||||
$timeout.flush();
|
|
||||||
expect(element).toBeShown();
|
expect(element).toBeShown();
|
||||||
|
|
||||||
$animate.enabled(true);
|
$animate.enabled(true);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue