Bug 233877 - Applies css transition when doing `.cancel()` on js animated element
Summary: Applies css transition when doing `.cancel()` on js animated element
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2021-12-06 08:02 PST by mattiasha
Modified: 2021-12-14 01:12 PST (History)
4 users (show)

See Also:

reproduction (2.59 MB, video/mp4)
2021-12-06 08:02 PST, mattiasha
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mattiasha 2021-12-06 08:02:40 PST
Created attachment 446039 [details]

Steps to reproduce:

I have attached a screencast of this:

1. Go to https://codepen.io/emattias/pen/NWaxYrp?editors=0110
2. Press "toggle start animation button"
3. See the leftmost column animate in without a problem
4. Press "css transition on" button
5. Press "toggle start animation button" again
6. See that it will apply the transition set in the css when the javascript animation is cancelled (with .cancel() method)

I can reproduce this in the latest firefox and safari versions but not in chrome. I think the way chrome handles it (not applying css transition) is what I prefer and expect to happen (since the width has not changed).
Comment 1 Radar WebKit Bug Importer 2021-12-13 08:03:22 PST
Comment 2 Antoine Quint 2021-12-13 10:23:25 PST
Have you also filed a bug on Chromium? I haven't looked into whether Chromium was right and Firefox+Safari was wrong, but given they are the only engine with a different implementation, it would be good to get their take on this as well.
Comment 3 mattiasha 2021-12-14 01:12:30 PST
I created a chromium bug for this here: https://bugs.chromium.org/p/chromium/issues/detail?id=1279736