Repository navigation
fix: Time selection reliability - #22854
Merged
Merged
Conversation
…croll events Intermediate ViewChanged Balance calls (added for fast-scrolling virtualization) were firing SelectionChanged before scroll animations settled. This caused keyboard-driven selection (e.g. SelectItemByIndex) to proceed from stale scroll positions, accumulating drift over many key presses and making SelectingTimeSetsSelectedTime flaky on Android Skia. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves LoopingSelector time selection reliability by preventing SelectionChanged from firing during intermediate ScrollViewer.ViewChanged updates, which previously could cause keyboard-driven selection flows to operate on transient scroll positions and drift over repeated inputs.
Changes:
- Suppress selection updates while balancing during intermediate
ViewChangedevents by temporarily setting_skipSelectionChangeUntilFinalViewChanged. - Preserve the prior value of
_skipSelectionChangeUntilFinalViewChangedvia atry/finallyto avoid leaking state across calls. - Expand inline documentation explaining the drift scenario and why selection changes are suppressed until the final event.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22854/wasm-skia-net9/index.html |
Contributor
|
|
jeromelaban
approved these changes
Mar 19, 2026
This was referenced Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…croll events
Intermediate ViewChanged Balance calls (added for fast-scrolling virtualization) were firing SelectionChanged before scroll animations settled. This caused keyboard-driven selection (e.g. SelectItemByIndex) to proceed from stale scroll positions, accumulating drift over many key presses and making SelectingTimeSetsSelectedTime flaky on Android Skia.
GitHub Issue: closes #
PR Type:
What is the current behavior? 🤔
What is the new behavior? 🚀
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️