demo · v139

Interruption Stability

Previously, switching transition to its initial value mid-flight snapped the property to its final state. v139 lets the in-flight transition complete. Press "start", then mid-animation press "set transition: none" — watch v139 keep gliding while the simulated old behaviour snaps.

v139 behaviour (browser) simulated pre-v139 (snap)
v139
pre-v139

the code

el.style.transition = "transform 2000ms ease";
el.style.transform = "translateX(400px)";

// Mid-flight:
el.style.transition = "none";   // v139: in-flight animation keeps running
                                // pre-v139: snaps to final position

see also