-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix ScrollToPosition.Center behavior in ScrollView on iOS and MacCatalyst #26825
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
Merged
PureWeen
merged 10 commits into
dotnet:inflight/current
from
devanathan-vaithiyanathan:fix-26760
Dec 16, 2025
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5acbc03
Fixed the ScrollToPosition.Center Centers the First Item too issue
Shalini-Ashokan 2a402aa
Revert the test case changes
Shalini-Ashokan e5fbb8d
Modified the test cases
Shalini-Ashokan b970b5c
Addressed a review concerns
Shalini-Ashokan 039cdba
Modified the test case
Shalini-Ashokan 750d0e1
Committed the images
Shalini-Ashokan 14ba241
Committed the images
Shalini-Ashokan ed01b9d
Committed the failure image
Shalini-Ashokan cc697df
Resaved the images
Shalini-Ashokan 9ec7bef
Modified the logics
Shalini-Ashokan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+43.7 KB
src/Controls/tests/TestCases.Android.Tests/snapshots/android/Bugzilla44461Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file added
BIN
+28.8 KB
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/Bugzilla44461Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-330 Bytes
(99%)
src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/ScrollToElement3End.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file added
BIN
+12.4 KB
src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/Bugzilla44461Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.8 KB
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/Bugzilla44461Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-615 Bytes
(99%)
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/ScrollToElement3End.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.
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.
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.
Just a heads up, I'm adapting this to fix the issue on my app via an overridden handler and ran into the following issue:
If the ContentSize Width of the scroll view is for whatever reason less than the width of the UIScrollView Frame's width, it causes an argument error. I'd suggest the following changes to account for it.
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.
@gdougherty-cbt, I have updated the code section based on your suggestions.