Skip to content

[Settings] Fix FancyZones page scroll bounce at Excluded apps#47937

Open
niels9001 wants to merge 1 commit into
microsoft:mainfrom
niels9001:fix/fancyzones-settings-scroll-bounce
Open

[Settings] Fix FancyZones page scroll bounce at Excluded apps#47937
niels9001 wants to merge 1 commit into
microsoft:mainfrom
niels9001:fix/fancyzones-settings-scroll-bounce

Conversation

@niels9001
Copy link
Copy Markdown
Collaborator

Summary

Fixes #25353 — the FancyZones Settings page bounces / jumps when the user scrolls down to the bottom (the Excluded apps expander). Several closed dupes report the same behavior: #31500, #34259, #30164, #45173, #32099, #32361.

Root cause

The Excluded-apps TextBox (lines 283-305 of FancyZonesPage.xaml) forced its own inner ScrollViewer to be permanently enabled with a visible scrollbar, nested inside the page-level ScrollViewer provided by SettingsPageControl:

ScrollViewer.IsVerticalRailEnabled="True"
ScrollViewer.VerticalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollMode="Enabled"

The expander is IsExpanded="True" and sits at the very bottom of the page, so when you wheel-scroll down the page the pointer ends up over the TextBox. The TextBox''s inner scroller intercepts the wheel events; when it has nothing left to scroll the event bubbles back to the outer page scroller, which tries to over-scroll past content end. The result is the bounce/jump visible in the videos on the issue.

The unbounded MinHeight="160" (with no MaxHeight) made it worse, because the box can grow as users type, triggering layout re-measures during scrolling.

Fix

Minimal change to the same TextBox:

  • Drop ScrollViewer.IsVerticalRailEnabled and ScrollViewer.VerticalScrollModeAcceptsReturn="True" already wires up the inner scroller correctly.
  • Change ScrollViewer.VerticalScrollBarVisibility from Visible to Auto, so the inner scroller only competes with the outer one when there is actual overflow to scroll.
  • Add MaxHeight="320" so the box cannot keep growing as the user types.

Validation

  • Builds clean (tools\build\build.cmd from src\settings-ui\Settings.UI, arm64 Debug, exit 0, 0 errors).
  • The same nested-scroller pattern exists on 9 other Settings pages (AlwaysOnTop, GrabAndMove, MouseUtils, MouseWithoutBorders, PowerAccent, PowerLauncher, ShortcutGuide). Keeping this PR atomic to the page called out in The FancyZones settings page bounces when scrolling to the bottom #25353; happy to follow up with a sibling PR for those if reviewers want them in the same pass.

The Excluded apps TextBox at the bottom of the FancyZones settings page
forced its inner ScrollViewer to be permanently enabled with a visible
scrollbar, nested inside the page-level ScrollViewer provided by
SettingsPageControl. When the wheel pointer reached the TextBox, the
two scrollers competed for wheel events and the page over-scrolled past
its content end, producing the bouncing effect tracked in microsoft#25353.

Drop the explicit ScrollViewer.VerticalScrollMode and IsVerticalRailEnabled
overrides, switch VerticalScrollBarVisibility from Visible to Auto, and
add MaxHeight=320 to bound the box's growth so layout cannot reflow
during scrolling.

Fixes microsoft#25353

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@niels9001
Copy link
Copy Markdown
Collaborator Author

Tested with a Logi mouse and can confirm that the stuttering is no longer there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The FancyZones settings page bounces when scrolling to the bottom

1 participant