Closed Bug 1564366 Opened 5 years ago Closed 5 years ago

CSS animation on :before element not unset

Categories

(Core :: CSS Transitions and Animations, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox-esr60 --- wontfix
firefox-esr68 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: sjors.rijsdam, Assigned: emilio)

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

I have created a progress indicator with some text and an icon in a generated element (:before).

When it is set in the busy state it is given an extra CSS class and the innerHTML is replaced. The CSS class animates the :before element. Afterwards when it is in the done state the busy CSS class is replaced with a done CSS class and the innerHTML is replaced again.

Isolated example: https://codepen.io/anon/pen/BgGgOE

Side note: In the example, when commenting out the lines that set the innerHTML the bug goes away and the behaviour is as expected.

Actual results:

Even though the animation CSS was removed by setting the done class, the :before element kept animating.

Expected results:

The :before element should have stopped animating in the done state.
Chrome and Safari do show the desired behaviour.

I tested this issue on Mac OS X 10.14 and Windows 10 x64 with FF release 68 and FF Nightly 70.0a1(2019-07-14) and I can reproduce the issue.

Status: UNCONFIRMED → NEW
Component: Untriaged → CSS Transitions and Animations
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All
Version: 67 Branch → Trunk

Thanks for the extremely reduced testcase! It's always very appreciated :)

Attached file A bit more reduced.
Keywords: regression
Flags: needinfo?(emilio)

Yeah, nothing jumps out to me from that list as being particularly likely.

Priority: -- → P3

I dug a bit and have a fix, though the nicer fix would be much harder.

Assignee: nobody → emilio
Flags: needinfo?(emilio)

This is the easy fix.

The hard fix (outlined in the comment) would be nice, but I don't think this bug
alone justifies it.

Did you happen to identify the regressing bug?

No, I didn't do manual bisection.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/654ddf428c90
Update animations when a pseudo-element had animations but no longer has, and has been re-framed in the meantime. r=birtles
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17854 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

Given how long this bug has been around, I'm thinking we can just let the fix ride the trains. Feel free to nominate for Beta approval if you feel strongly otherwise, however.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: