WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
20132
CSS animation doesn't work with onclick="this.className='newClassName'" anymore
https://bugs.webkit.org/show_bug.cgi?id=20132
Summary
CSS animation doesn't work with onclick="this.className='newClassName'" anymore
Tomomi
Reported
2008-07-22 11:29:53 PDT
On the current WebKit nightly (
r35249
), css animation doesn't work when swapping class names with oncick event handler attributes like, using this.className='newClassName'. The className swap was working perfectly on
r35231
. Changing the values of style object properties, instead, as onclick="this.style.opacity='0'" works fine. Please see the sample file on:
http://girliemac.com/iphone/anim_bug.html
thanks !
Attachments
Add attachment
proposed patch, testcase, etc.
Dave Hyatt
Comment 1
2008-07-22 13:03: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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug