Skip to content

[scroll-animations-1] Order of pause, setTimeline #5653

Closed
@andruud

Description

@andruud

With @scroll-timeline it's possible to switch the timeline and pause the animation at the "same" time. E.g. you can toggle a class like: .switch { animation-timeline: other; animation-play-state: paused; }.

During setTimeline, we don't expect the current time to change if the animation is paused [1], but we do expect the current time to "reset" if the animation is playing, hence it matters which order we do things in:

  • If we pause first, then set the timeline, the current time will not be updated until we resume, and we'll be paused on the old timeline.
  • If we set the timeline first, then pause, the current time is updated right away, and we'll be paused on the new timeline.

Note a huge deal I think, we just need to specify what should happen.

cc @kevers-google @ogerchikov

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions