Summary: | Transition CSS added to DOM element uses previously removed class | ||
---|---|---|---|
Product: | WebKit | Reporter: | Dan Ackroyd <Danack> |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | dino, simon.fraser |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Dan Ackroyd
2013-03-07 05:58:51 PST
This is expected behavior, and allowed by the transitions spec. CSS doesn't actually describe how and when styles are resolved, and most browsers batch style changes. That means that the removeClass('active') and addClass('all-transition') basically happen at the same time. If you don't want this, you can force a layout between them (e.g. via body.offsetWidth), or put the second line inside a setTimeout(, 0). |