Summary: | CSS animation doesn't work with onclick="this.className='newClassName'" anymore | ||
---|---|---|---|
Product: | WebKit | Reporter: | Tomomi <tomomi.i> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 | ||
URL: | http://girliemac.com/iphone/anim_bug.html |
Description
Tomomi
2008-07-22 11:29:53 PDT
This is INVALID. For a brief period in the nightlies we tried out a "source transition" model, i.e., having the transitions in the "before style" determine how you transition. However, Safari 3.1 (and current nightlies) use a "destination transition" model, i.e., having the transitions in the "after style" determine how you transition. Your example has the transitions defined only for one class and not for the other. Therefore in one direction the transition isn't going to apply. If you want the transition to apply in both directions, move it into a more global rule that will stay in effect for both class names. If you really did want the transition to only be one-way, then move the transition rules into the other class name rule. We plan to clarify this in the spec. The destination model makes more sense mainly because it allows authors to set new transitions and a new destination value using .style in JS and then have the transition go. A source model would not allow this and would force you to use setTimeout hacks. |