Skip to content

[scroll-animations] End < Start offset can cause the ScrollTimeline to produce negative time #4351

@majido

Description

@majido

The spec does not require start and end offset to have a strict ordering so it is possible to define
start offset that is larger than end offset. This combined with how the current time is computed can lead to a negative current time.

(current scroll offset - startScrollOffset) / (endScrollOffset - startScrollOffset) × effective time range

A similar concern exists for timeRange which can also be negative.

Is this intentional or should there be more constraints over these values so that currentTime is always guaranteed to be a positive values?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions