-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] Fix for Scrollview.ScrollTo execution only returns after manual scroll #28528
base: main
Are you sure you want to change the base?
[Windows] Fix for Scrollview.ScrollTo execution only returns after manual scroll #28528
Conversation
Hey there @HarishwaranVijayakumar! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where ScrollView.ScrollTo on Windows would not complete the operation when the requested offset matched the current offset, causing the await to wait indefinitely.
- Added automated tests for the issue in both shared tests and the host app.
- Updated the Windows ScrollViewHandler to immediately mark scrolling as finished when the requested offset matches the current offset.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue15508.cs | Added a test that verifies the scroll operation completes as expected. |
src/Controls/tests/TestCases.HostApp/Issues/Issue15508.cs | Implemented a UI test demonstrating the scroll fix in the host app. |
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Windows.cs | Updated scroll behavior to handle cases where the current offset matches the requested offset. |
Comments suppressed due to low confidence (2)
src/Controls/tests/TestCases.HostApp/Issues/Issue15508.cs:29
- [nitpick] Consider renaming the local variable _scrollButton to scrollButton for clarity, reserving the underscore prefix for private fields.
Button _scrollButton = new Button
src/Core/src/Handlers/ScrollView/ScrollViewHandler.Windows.cs:77
- [nitpick] If VerticalOffset and HorizontalOffset are floating point values, consider using an epsilon-based comparison to handle potential precision issues.
if (request.VerticalOffset == handler.PlatformView.VerticalOffset && request.HorizontalOffset == handler.PlatformView.HorizontalOffset)
Root Cause of the issue
Description of Change
Issues Fixed
Fixes #15508
Tested the behaviour in the following platforms
Output
Beforefix_scroll.mp4
Afterfix_scroll.mp4