[iOS] Fixed Current Item change on Device Orientation#32672
Merged
jfversluis merged 4 commits intodotnet:inflight/currentfrom Dec 1, 2025
Merged
[iOS] Fixed Current Item change on Device Orientation#32672jfversluis merged 4 commits intodotnet:inflight/currentfrom
jfversluis merged 4 commits intodotnet:inflight/currentfrom
Conversation
Contributor
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
StephaneDelcroix
previously approved these changes
Nov 24, 2025
PureWeen
pushed a commit
that referenced
this pull request
Dec 3, 2025
Updated test cases Update Fix on carousel view controller Added Snapshots for iOS and android
PureWeen
pushed a commit
that referenced
this pull request
Dec 3, 2025
Updated test cases Update Fix on carousel view controller Added Snapshots for iOS and android
PureWeen
pushed a commit
that referenced
this pull request
Dec 3, 2025
Updated test cases Update Fix on carousel view controller Added Snapshots for iOS and android
PureWeen
pushed a commit
that referenced
this pull request
Dec 3, 2025
Updated test cases Update Fix on carousel view controller Added Snapshots for iOS and android
github-actions bot
pushed a commit
that referenced
this pull request
Dec 5, 2025
Updated test cases Update Fix on carousel view controller Added Snapshots for iOS and android
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
RootCause :
On device rotation, the CarouselView changed its current item (or scrolled unexpectedly) because offset.X became inconsistent during layout invalidation, resulting in an incorrect page index calculation.
Description of Change
initialLoad,_isRotating) inCarouselViewController2to detect and handle device orientation changes, and prevent updating the current item during rotation.LayoutFactory2.csto skip position updates if a rotation is in progress, ensuring the carousel does not scroll or change items during orientation changes.Issues Fixed
Fixes #32394
Fixes #28972
Tested the behavior in the following platforms
BeforeFix32394.mov
AfterFix32394.mov