microsoft / microsoft/microsoft-ui-xaml

[Inertia] Interaction doesn't respect system scroll inertia

Open
#10,830 0 comments 0 reactions 0 assignees View on GitHub
area-Scrolling bug
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

Today, many UI surfaces behave poorly when scrolling on trackpads due to lingering inertia. For example, scrolling a webpage to find some text, then pressing `Ctrl` in preparation to copy with `Ctrl+C` causes pages to zoom wildly.

It's not well-documented, but we fixed that: in recent builds of Windows (later than Sept 2024's Beta [KB5043166](https://blogs.windows.com/windows-insider/2024/09/30/announcing-windows-11-insider-preview-build-22635-4291-beta-channel/)), pressing any key [cancels inertia](https://task.ms/51449382) (internal link).

However, XAML surfaces do not seem to respect this, leading to runaway zoom bugs like [Terminal 5708](https://github.com/microsoft/terminal/issues/5708).

### Why is this important?

Runaway zoom is a very frustrating behavior. It is extremely disorienting, confusing, and slow to resolve.

Apps like Terminal have implemented mitigations to prevent this behavior.

Competitors like macOS do not have this issue because most shortcuts begin with `Cmd`, so copying does not impact apps that implement `Ctrl+scroll`.

### Steps to reproduce the bug

On a recent build of Windows (newer than 2024), in WinUI Gallery, on a laptop:

1. Open the ScrollView page.
2. Begin scrolling (with inertia)
3. Press `Ctrl`.

### Actual behavior

Scrolling does not stop.

### Expected behavior

Scrolling should stop.

### Windows version

Any recent build (later than Sept 2024's Beta [KB5043166](https://blogs.windows.com/windows-insider/2024/09/30/announcing-windows-11-insider-preview-build-22635-4291-beta-channel/)) with [work item 51449382](https://task.ms/51449382) (internal link)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in WinUI Gallery on the ScrollView page using a laptop trackpad: start inertial scrolling, then press Ctrl, and verify whether scrolling continues. Investigate the XAML surface and input handling involved in ScrollView, then confirm that pressing Ctrl stops the inertia and prevents runaway zoom behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.