Skip to content

[css-scroll-snap-1] unrelated-gesture-scroll-during-snap.html relies on scroll events lacking intended direction #1288

@denvercoder21

Description

@denvercoder21

Test List

https://github.com/web-platform-tests/wpt/blob/master/css/css-scroll-snap/unrelated-gesture-scroll-during-snap.html

Rationale

css/css-scroll-snap/unrelated-gesture-scroll-during-snap.html asserts that a WebDriver scroll action snaps backward to the original position (scrollTop == 0). This only holds if the wheel event produced by the scroll action has no intended direction.

Per css-scroll-snap-1 §6.1, wheel events are relative scrolls, and relative scrolls always have an intended direction. With an intended direction, scroll snap must select the nearest snap point in the scroll direction, which in this test would be the next snap area (~280px), not 0.

Internally switching to pan gestures could be a fix, but only temporarily, because these too will be treated as relative scrolls once csswg-drafts #12840 ("Panning gesture should be treated as relative for last scroll direction.") is in place and implemented.

If possible, it would be good to revise the test such that it still tests the desired use case, but independent of WebDriver's scroll action having absolute or relative scroll behavior.

/Update: This is our proposal to allow absolute and relative scrolls in the test: wpt #60235

Metadata

Metadata

Assignees

No one assigned

    Labels

    test-change-proposalProposal to add or remove tests for an interop area

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions