Closed Bug 1151861 Opened 9 years ago Closed 9 years ago

CSS animations do not restart when setting "display: block"

Categories

(Core :: Layout, defect)

36 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 962594

People

(Reporter: willsonsmth, Unassigned)

Details

(Keywords: testcase)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150320202338

Steps to reproduce:

Made an element on a page with an animation.
Animation plays.
Set element.style.display = "none"; in javascript
Set element.style.display = "block"; in javascript



Actual results:

The animation initially plays on the page as expected, however after hiding and showing the element: the animation did not restart. The element just showed as though it had no animations.


Expected results:

According to the CSS animations spec: 
"...If an element has a display of none, updating display to a value other than none will start all animations applied to the element by the animation-name property, as well as all animations applied to descendants with display other than none."
(http://dev.w3.org/csswg/css-animations-1/)

The element should have restarted its animation, or any children of the displayed element.


A test case can be found here:
https://codepen.io/willsonsmith/pen/YPbLBR
Component: Untriaged → Layout
Keywords: testcase
Product: Firefox → Core
I think this was a relatively recent spec change.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.