microsoft / microsoft/microsoft-ui-xaml

ScrollViewer overscrolls with the mouse wheel when IsScrollInertiaEnabled="False"

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

Description

### Describe the bug

ScrollViewer overscrolls showing black stripes ouside the content bounds when scrolling vertically using the mouse wheel, if IsScrollInertiaEnabled="False".

### Steps to reproduce the bug

1. define a ScrollViewer in WinUI 3 XAML
2. set IsScrollInertiaEnabled="False"
3. place a Canvas cantrol with some content larger than the Scrollviewer's dimensions inside the ScrollViewer
4. scroll vertically using the mouse wheel

### Expected behavior

the Scrollviewer scrolls from one edge of the canvas to the other without showing any black stripes outside the canvas bounds.

### Screenshots

![Image](https://github.com/user-attachments/assets/c9f31970-920d-42c0-b56d-0c40ff6909cb)
![Image](https://github.com/user-attachments/assets/beac1f2b-f6ae-419b-8c38-91d10955e667)

### NuGet package version

WinUI 3 - Windows App SDK 1.6.3: 1.6.241114003

### Windows version

Windows 11 (24H2): Build 26100

### Additional context

this behavior is only displayed when using the mouse wheel, scrolling with the scrollbar works as expected.
I've been unable to change it using any XAML commands.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in a WinUI 3 XAML app with a ScrollViewer containing an oversized Canvas, setting IsScrollInertiaEnabled to False and scrolling with the mouse wheel. Compare mouse-wheel behavior with scrollbar scrolling; done means vertical scrolling stays within the Canvas bounds without black stripes.

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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.