-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix(ngAnimate): allow animations on body and root elements #11956
Conversation
@matsko could you take a look at this? |
@petebacondarwin @OlenDavis here is the completed commit with your tests: |
Do you need me to add those tests to my commit? I'm sorry; it's just that I can't actually run the tests or even complete the normal grunt build locally because I get a |
No that's fine. The commit I posted can be merged in so long as you're happy with the tests. |
I'm unfamiliar with $$AnimateRunner and $$animate, but the tests look great; thank you! And, I'm very glad you went the extra inch and added the check for the HTML/document.documentElement element as well as body. |
@matsko - do you want to merge this then? |
This is the final PR that will go in: #12245 |
Overview of the Issue:
Animations on
<body>
and the root element don't work.Motivation for or Use Case:
I have a class-based animation on the
<body>
element (though I noticed this would also be an issue for animations on the root element).Angular Version(s):
v1.4.0-rc.2
Browsers and Operating System:
Chrome Version 45.0.2414.0 canary (64-bit), Mac OS X Yosemite Version 10.10.3 (14D136)
Reproduce the Error:
See this Plunker.
Related Issues:
The only open issue related to animate and body or root I found was #10527.
Suggest a Fix:
All that needed to be fixed was initializing
(body|root)ElementDetected
to whether the current element matches the body or root element rather than false; otherwise, the animated element is never checked as being within the body and root element and can therefore never be animated.I believe all that needs to be added to this fix is testing if you agree this is a valid and relevant issue as fixed.