-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] ScrollView content offset RTL - fix #30724
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
Conversation
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 a regression in iOS ScrollView content offset handling for Right-To-Left (RTL) layouts that was introduced by PR #30453, which had previously broken the fix from PR #29469. The fix refines the condition logic for RTL content offset adjustment and improves the UI test to better validate the behavior.
- Refines the condition for when to adjust content offset in RTL layouts by adding a null check
- Improves the UI test to use more robust position-based assertions instead of just waiting for elements
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Core/src/Platform/iOS/MauiScrollView.cs | Fixes RTL content offset logic by adjusting conditional checks |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29458.cs | Replaces flaky element wait with position-based assertions |
|
Do we need to backport this to sr9? |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 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.
The test ScrollViewShouldWorkInRTL is failing on Mac:
Assert.That(App.FindElement("Tab5LTR").GetRect().X, Is.LessThan(App.FindElement("RTLScrollView").GetRect().Width * 1.2f))
Expected: less than 948.000061f
But was: 1128
This test is supposed to run on iOS and Android only. Fixed |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/backport to release/9.0.1xx-sr9 |
|
Started backporting to release/9.0.1xx-sr9: https://github.com/dotnet/maui/actions/runs/16772111700 |
* Fix Issue29458 and improve test * Update Issue29458.cs
* Fix Issue29458 and improve test * Update Issue29458.cs
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!
Description of Change
This PR #30453 regressed the fix introduced here #29469. The regression hasn't been caught by a flaky UI test, so I've improved it