mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
fix($animate): use direct DOM comparison when checking for $rootElement
Closes #4679
This commit is contained in:
parent
7f0767acab
commit
d434eabec3
2 changed files with 6 additions and 1 deletions
|
|
@ -697,7 +697,7 @@ angular.module('ngAnimate', ['ng'])
|
|||
}
|
||||
|
||||
function animationsDisabled(element, parent) {
|
||||
if(element == $rootElement) {
|
||||
if(element[0] == $rootElement[0]) {
|
||||
return rootAnimateState.disabled || rootAnimateState.running;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,6 +96,11 @@ describe("ngAnimate", function() {
|
|||
|
||||
$animate.addClass(elm2, 'klass2');
|
||||
expect(count).toBe(2);
|
||||
|
||||
var root = angular.element($rootElement[0]);
|
||||
$rootElement.addClass('animated');
|
||||
$animate.addClass(root, 'klass2');
|
||||
expect(count).toBe(3);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue