Skip to content

Differentiate trackpad from mouse wheels on web #139990

@Piinks

Description

@Piinks

With Flutter web on some desktop platforms (Windows and Linux), we do not know the difference between a trackpad and a physical mouse scroll wheel when the input is received by the framework. Because of this, both mouse and trackpad input is treated the same way, going through the pointerScroll method of ScrollPosition to handle the input.

When we know the difference, the trackpad is handled differently, supporting other interactions like panning, zooming, smoothing of input in accordance with the scroll physics upon release, etc. This should be available on all platforms, not just some.

For Mac, a heuristic was developed to tell the difference between these input devices, and has worked really well:

We need to do the same for Windows and Linux so that the experience is consistent across all platforms.

This is also needed to resolve #32120

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: fidelityMatching the OEM platforms bettera: mouseIssues related to using a mouse or mouse supporta: qualityA truly polished experienceengineflutter/engine related. See also e: labels.f: scrollingViewports, list views, slivers, etc.platform-linuxBuilding on or for Linux specificallyplatform-webWeb applications specificallyplatform-windowsBuilding on or for Windows specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions