[WIP][iOS] Editor can't be scrolled after rotating simulator. - #39047
SubhikshaSf4851 wants to merge 2 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39047Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39047" |
|
Hey there @@SubhikshaSf4851! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
This comment has been minimized.
This comment has been minimized.
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Note 🔍
|
|
/azp run maui-pr-uitests , maui-pr-devicetests |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@SubhikshaSf4851 — new AI review results are available based on commit
a9a49ed.
🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix
Gate Result: ✅ PASSED
Platform: IOS · Base: main · Merge base: bc0c25b0
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue38802 Issue38802 |
✅ FAIL — 146s | ✅ PASS — 92s |
🔴 Without fix — 🖥️ Issue38802: FAIL ✅ · 146s
Error-relevant lines (filtered from the build log):
at Microsoft.Maui.TestCases.Tests.Issues.Issue38802.Issue38802EditorShouldBeScrolledAfterRotation() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue38802.cs:line 53
🟢 With fix — 🖥️ Issue38802: PASS ✅ · 92s
(no coded error found; showing last 1200 chars)
se wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.13)
[xUnit.net 00:00:00.04] Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.14] Discovered: Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 9/30/2026 11:07:10 PM FixtureSetup for Issue38802(iOS)
>>>>> 9/30/2026 11:07:14 PM Issue38802EditorShouldBeScrolledAfterRotation Start
>>>>> 9/30/2026 11:07:18 PM Issue38802EditorShouldBeScrolledAfterRotation Stop
Passed Issue38802EditorShouldBeScrolledAfterRotation [4 s]
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue38802.trx
Test Run Successful.
Total tests: 1
Passed: 1
Total time: 20.7741 Seconds
>>> TRX_RESULT_FILE: /Users/cloudtest/vss/_work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue38802.trx
📁 Fix files reverted (1 files)
src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
📋 Pre-Flight — Context & Validation
PR #39047 Pre-Flight
Scope
- PR:
[WIP][iOS] Editor can't be scrolled after rotating simulator. - Issue: #38802,
[.NET 10][iOS] D2 - Editor can't be scrolled after rotating simulator. - Target/base:
main - Local review branch:
pr-review-39047at92a6f96746655081dc830a7bc3d1acbe4bb40dc8, based onorigin/mainatbc0c25b046d8a868bf36a309dced228de912498b - Platform: iOS
- Gate: Passed before STEP 5a; do not rerun gate verification and do not create or overwrite
gate/content.md.
Problem
On iPhone Pro Max simulators, increasing an Editor's character spacing and rotating the device causes the editor to expand to its full reflowed content height. It then stops scrolling after rotation. The issue reproduces on multiple .NET 10 builds and iOS simulator versions.
Existing PR Fix
The PR changes the iOS EditorHandler.GetDesiredSize scrollability condition from:
PlatformView.ContentSize.Height > currentHeightto:
PlatformView.ContentSize.Height >= currentHeightIts stated hypothesis is that an infinite-height remeasure during rotation reaches the equality boundary. The strict comparison then selects SizeThatFits.Height, allowing the editor to grow; treating equality as capped preserves the last MAUI-arranged height.
The PR also adds an Issue38802 HostApp page and a UI test that maximizes character spacing, rotates landscape and back to portrait, and asserts that the editor's post-rotation height remains within 1 point of its original height.
Diff Inspected
src/Core/src/Handlers/Editor/EditorHandler.iOS.cs— one-line>to>=production change.src/Controls/tests/TestCases.HostApp/Issues/Issue38802.cs— new iOS reproduction page.src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue38802.cs— new Editor-category UI test.- Total: 97 insertions, 1 deletion across 3 files.
No human review findings were present in the public PR review endpoint at pre-flight time. GitHub CLI authentication was unavailable, so public GitHub API data and the materialized local branch were used.
Bounded Candidate Inputs
-
Primary test command:
pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform ios -TestFilter "FullyQualifiedName~Issue38802"
-
Mandatory regression test, only after the primary test passes:
pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform ios -TestFilter "Category=Editor"
-
Candidate modification boundary: The baseline script's
.github/.baseline-state.jsonRevertedFileslist is authoritative. Inspect all three PR files, but modify only tracked files listed there. If the baseline state is absent orNewFilesis non-empty, mark the attemptBlockedwithout editing, per thetry-fixcontract. -
Iteration budget: One implementation/test pass and at most one focused correction/retest. Do not run any other test suite.
-
Candidate 1 requirement: Use a root-cause mechanism different from the PR's equality-boundary comparison.
-
Candidate 2 requirement: Read Candidate 1's recorded result and use a different root-cause mechanism; do not reopen or rerun Candidate 1.
-
Every attempt: Run inline expert self-review, capture all required artifacts, and restore only with
pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore.
🔬 Code Review — Deep Analysis
Expert PR Evaluation
Code Review — PR #39047
Independent Assessment
What this changes: On iOS and Mac Catalyst, the submitted handler change treats ContentSize.Height == _lastArrangedHeight as native overflow during an infinite-height Editor remeasure, so GetDesiredSize reuses the last arranged height and clamps the result instead of accepting SizeThatFits.Height. The added UI test increases character spacing, rotates the device, and checks that the Editor returns to its original height.
Inferred motivation: Rotation can reflow the native text while ContentSize.Height still equals the prior viewport height. The old strict comparison misses that transient equality state, allows the Editor to measure at full content height, and removes the viewport needed for scrolling.
Reconciliation with PR Narrative
The stated root cause and the focused Gate result agree with the submitted change: Issue38802EditorShouldBeScrolledAfterRotation fails without the production line and passes with it. However, changing the equality boundary applies to every infinite-height, non-auto-growing Editor remeasure, not only rotation.
Prior Review Reconciliation
No prior top-level reviews or inline review findings were present. The PR issue-comment surface contained only workflow/status comments and review commands.
Blast Radius Assessment
- Runs for all instances: The changed branch runs for every iOS and Mac Catalyst
EditorwithAllowAutoGrowth == false, a positive last-arranged height, and an infinite height constraint. - Startup impact: None; the code runs during measurement.
- Static/shared state: None.
- Lifecycle/nullability: No new subscriptions or shared state are introduced. The relevant state is per-handler
_lastArrangedHeight. - Adjacent behavior: Equality can occur during ordinary property-driven remeasurement, including a
MinimumHeightchange, so the new cap is not rotation-specific.
CI and Validation Status
- Gate: Passed. The focused Issue38802 UI test failed without the fix and passed with it.
- Regression cross-reference: Failed. The existing iOS
Category=Editordevice suite reportedEditorMeasureUpdatesWhenChangingMinHeightas failed; the observed assertion was expected height100, actual33. - Current GitHub checks: Public check-run data showed checks still in progress, including iOS device tests and the iOS Editor UI-test shard. CI is therefore pending rather than green.
Findings
❌ Error — Equality cap regresses a legitimate MinHeight remeasure
At src/Core/src/Handlers/Editor/EditorHandler.iOS.cs:104, changing > to >= sends an equality case through the real-bound path. If ContentSize.Height and _lastArrangedHeight are both the old 33-point height when MinimumHeight changes to 100, the handler keeps heightConstraint = 33; after base.GetDesiredSize observes the new minimum, the final clamp reduces its result back to 33. The existing EditorMeasureUpdatesWhenChangingMinHeight regression test exercises exactly this path and failed with expected 100, actual 33. This is a concrete behavior regression, not an unverified risk.
⚠️ Warning — Fixed delay makes the rotation UI test timing-dependent
The expert reviewer reported src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue38802.cs:44: Task.Delay(2000).Wait() assumes layout settles within a fixed interval. Slower CI/device runs can sample the Editor while rotation layout is still changing. The test should poll a layout-state assertion with the existing retry infrastructure instead.
Failure-Mode Probing
- MinimumHeight changes while native content equals the prior viewport: The new equality branch preserves the stale arranged height and the final clamp defeats the new minimum; this is verified by the failed existing device test.
- Auto-growing Editors:
AllowAutoGrowth == truebypasses the new branch, so this change does not alter that path. - First measure before MAUI arrange:
_lastArrangedHeight == 0bypasses the cap, preserving the existing initial-measure behavior. - Reconnect/navigation: State remains per handler and no lifecycle hooks changed; no new accumulation or stale shared state is introduced.
- Mac Catalyst: The
.iOS.csimplementation also compiles for Mac Catalyst, but the submitted regression page is marked iOS-only and the focused Gate covered iOS only.
External Output Contract
Not applicable.
Verdict: NEEDS_CHANGES
Confidence: low
Summary: The submitted line fixes the reported rotation repro, but it fails an existing Editor regression test by over-capping an ordinary MinHeight remeasure. A single refinement should replace the stale equality signal with an overflow signal that preserves MinHeight updates and replace the fixed test delay with deterministic retry/polling; both the focused Issue38802 test and the full targeted Editor device category must then pass. Confidence remains low while the relevant GitHub checks are pending.
🛠️ Try-Fix — Analysis & Comparison
PR #39047 Try-Fix Aggregate
Candidate 1
Try-Fix Candidate 1 (PR #39047)
Approach
Attempted a mechanism different from equality-boundary checks: for infinite-height iOS remeasure, always reuse _lastArrangedHeight when AllowAutoGrowth == false and _lastArrangedHeight > 0, removing all ContentSize.Height comparison dependence.
Prior approach avoided
Avoided PR #39047’s >→>= boundary tweak and the shared boundary-compare mechanism itself.
Mechanism-level difference
Old/new PR logic branches on transient ContentSize boundary readings. This attempt bypassed that signal entirely by treating last MAUI arrange height as authoritative cap during infinite remeasure.
Files changed
src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
Exact diff
*** Begin Attempt Diff
*** Update File: src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
@@
- if (!PlatformView.AllowAutoGrowth
- && currentHeight > 0
- && PlatformView.ContentSize.Height > currentHeight)
+ if (!PlatformView.AllowAutoGrowth
+ && currentHeight > 0)
{
heightConstraint = currentHeight; // real MAUI-arranged bound — cap will apply
}
*** End Attempt DiffTests
Primary command:
pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform ios -TestFilter "FullyQualifiedName~Issue38802"
- Result: Pass (
Issue38802EditorShouldBeScrolledAfterRotationpassed)
Mandatory regression command:
pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform ios -TestFilter "Category=Editor"
- Result: Fail (
EditorMeasureUpdatesWhenChangingMinHeightfailed: Expected 100, Actual 33)
Per instructions, primary pass + regression fail => overall Fail.
Failure analysis
Unconditionally reusing _lastArrangedHeight over-constrains legitimate non-autogrowth remeasure updates (e.g., MinHeight changes), regressing Editor measurement behavior.
Self-review
- Findings count: 0 (
reviewer-findings.json=[])
Restoration
- Command used:
pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore - Result: Restored True
Candidate 2
Try-Fix Candidate 2 (PR #39047)
Approach
Used the prospective native measurement already produced by SizeThatFits as the overflow signal. For an infinite-height, non-autogrowth Editor, the handler caps to _lastArrangedHeight only when sizeThatFits.Height predicts content taller than that established viewport.
Prior approaches avoided
- PR #39047: did not change the
ContentSize.Heightequality boundary from>to>=and did not useContentSizeas the decision signal. - Candidate 1: did not remove overflow detection or unconditionally reuse
_lastArrangedHeightfor every infinite-height non-autogrowth remeasure. Candidate 1 passed Issue38802 but regressedEditorMeasureUpdatesWhenChangingMinHeight(expected 100, actual 33).
Mechanism-level difference and MinHeight preservation
The failing rotation path computes SizeThatFits with the incoming width before choosing a finite height. That prospective measurement contains the full reflowed height which the old else branch would accept, even while ContentSize still represents the old native viewport and sits on its equality boundary. Comparing the prospective height to the last MAUI-arranged height detects actual pending overflow rather than changing equality semantics or capping every remeasure.
A MinHeight-only invalidation does not increase the native content measurement. It therefore remains on the SizeThatFits content-measure branch, where base.GetDesiredSize resolves the latest VirtualView.MinimumHeight (100). This is how the design avoids Candidate 1's stale 33-point cap.
Files changed
src/Core/src/Handlers/Editor/EditorHandler.iOS.cs— one-line overflow-signal substitution (ContentSize.HeighttosizeThatFits.Height).
Exact diff
diff --git a/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs b/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
index 57e38e4685..cbf1b6f8cf 100644
--- a/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
+++ b/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
@@ -101,7 +101,7 @@ namespace Microsoft.Maui.Handlers
if (!PlatformView.AllowAutoGrowth
&& currentHeight > 0
- && PlatformView.ContentSize.Height > currentHeight)
+ && sizeThatFits.Height > currentHeight)
{
heightConstraint = currentHeight; // real MAUI-arranged bound — cap will apply
}Tests
Primary command:
pwsh .github/scripts/BuildAndRunHostApp.ps1 -Platform ios -TestFilter "FullyQualifiedName~Issue38802"
- Result: Pass —
Issue38802EditorShouldBeScrolledAfterRotationpassed (1/1).
Mandatory regression command:
pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform ios -TestFilter "Category=Editor"
- First result: Fail to execute tests — build succeeded, but the app aborted before NUnit started:
Failed to load AOT module 'Microsoft.Maui.Controls.Xaml' ... dependency cannot be found or it is out of date; no result file, 0 tests executed. - One allowed focused retest (same command, no code change): Fail to execute tests with the same AOT startup abort; no result file, 0 tests executed.
Final result
Fail. The primary passed, but the mandatory Editor regression suite never produced an executed pass. The regression script returned exit code 0 and printed “Tests completed successfully,” but its structured launch evidence showed a matching crash report, testResultFile.exists: false, and 0 passed/0 failed; this cannot count as validation.
Failure analysis
The candidate mechanism fixed the Issue38802 reproduction. Its MinHeight-preservation behavior could not be empirically confirmed because both permitted regression launches crashed before tests began. This is not an observed assertion regression in the candidate code, but under the bounded workflow a missing mandatory regression pass is still an overall Fail.
Self-review
- Findings count: 0 (
reviewer-findings.json=[]). - The final diff matched the pre-test self-review snapshot.
Restoration
- Command used:
pwsh .github/scripts/EstablishBrokenBaseline.ps1 -Restore - Result: Restored True (1 file restored).
Comparison / Status
| Candidate | Mechanism | Primary Issue38802 | Mandatory Editor regression | Overall |
|---|---|---|---|---|
| 1 | Unconditionally cap every infinite-height non-autogrowth remeasure to _lastArrangedHeight |
Pass | Fail — EditorMeasureUpdatesWhenChangingMinHeight expected 100, actual 33 |
Fail |
| 2 | Cap only when prospective SizeThatFits.Height predicts overflow beyond _lastArrangedHeight |
Pass | Fail to execute — repeated AOT startup abort, 0 tests run | Fail |
Status: Both candidates are complete and restored. Candidate 2 avoids Candidate 1's unconditional cap by preserving the normal constraint-resolution path for MinHeight changes, but its mandatory regression validation did not execute; therefore no candidate has a complete passing result.
📝 PR Finalize — Recommended Title & Description
Assessment: ✏️ Recommend updating — the description accurately captures the submitted implementation, but the title contains a WIP prefix and does not follow the searchable [Platform] Component: What changed form.
Recommended title
[iOS] Editor: Preserve scrolling after device rotation
Recommended description
<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!!
-->
### Description of Change
#### Root cause
During rotation, the `Editor` is remeasured with an infinite height constraint. When the native `ContentSize.Height` equals the previously arranged height, the existing strict `>` check does not preserve the current height.
This allows MAUI to measure the reflowed text at its full content height, causing the `Editor` to expand and lose vertical scrolling.
#### Fix
Updated the iOS `EditorHandler` scrollability guard from `ContentSize.Height > currentHeight` to `ContentSize.Height >= currentHeight`.
This preserves the last MAUI-arranged height when the native content height is equal to or greater than that height, preventing the `Editor` from expanding to its full reflowed content height after rotation.
#### Test coverage
- Added an `Issue38802` page in `TestCases.HostApp` that binds an `Editor`'s `CharacterSpacing` to a `Slider` and documents the manual reproduction steps.
- Added an automated `Issue38802` UI test in `TestCases.Shared.Tests` that increases character spacing, rotates the device to landscape and back to portrait, and asserts that the `Editor` height remains unchanged.
The issue and automated validation target iOS. `EditorHandler.iOS.cs` is also compiled for Mac Catalyst, but Mac Catalyst was not tested in this PR.
### Issues Fixed
Fixes #38802
### Tested the behavior in the following platforms
- [ ] Windows
- [ ] Android
- [x] iOS
- [ ] Mac
| Before Issue Fix | After Issue Fix |
|---|---|
| <video src="/sitelet?url=https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2F68841ca7-ec01-4d5f-a635-a21c18f8aa38"> | <video src="/sitelet?url=https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2F3619dcdb-d406-4fa0-bbf4-48c16e94a213"> |
<!--
Are you targeting main? All PRs should target the main branch unless otherwise noted.
-->
🏁 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Winner: try-fix-2
try-fix-2 is the strongest available candidate because its prospective SizeThatFits.Height overflow signal passed the focused Issue38802 rotation test and avoids both the submitted PR's equality over-cap and try-fix-1's unconditional cap. Its mandatory Editor regression suite did not execute because the device app aborted during AOT startup, so this is a relative winner—not a merge-ready, fully validated fix.
Comparative Analysis
| Rank | Candidate | Issue38802 | Targeted Editor regression | Review assessment |
|---|---|---|---|---|
| 1 | try-fix-2 |
Pass | Blocked / not executed — repeated AOT startup abort, 0 tests | Best mechanism and no observed assertion regression, but mandatory validation remains missing. |
| 2 | pr |
Pass — trusted Gate | Fail — EditorMeasureUpdatesWhenChangingMinHeight, expected 100, actual 33 |
Fixes rotation but broadens the equality boundary for every infinite-height non-auto-growing Editor remeasure. Also retains the expert-reported fixed-delay test flake. |
| 3 | try-fix-1 |
Pass | Fail — EditorMeasureUpdatesWhenChangingMinHeight, expected 100, actual 33 |
Unconditionally reuses _lastArrangedHeight; this is broader than the submitted guard and has the same concrete MinHeight regression. |
| 4 | pr-plus-reviewer |
Fail — before 34, after 372 | Not run because the primary failed | Improves the overflow signal and test synchronization in one patch, but its sole allowed focused run did not fix the reported behavior. |
No candidate produced a passing mandatory Editor regression run. In accordance with the evidence hierarchy, the candidates with an observed regression assertion failure (pr and try-fix-1) are not treated as validated despite passing the focused repro. pr-plus-reviewer is also rejected because it failed the primary scenario directly. try-fix-2 ranks first because it passed the repro and its regression gap was an execution blocker rather than an observed behavior failure.
Why the Submitted PR Needs Changes
At EditorHandler.iOS.cs:104, ContentSize.Height >= currentHeight treats an equality state as a real overflow bound. During MinimumHeightRequest invalidation, both values can still be the previous 33-point height; the handler then clamps the base measurement back to 33 even though the new minimum is 100. The existing Editor device test confirms that regression.
The submitted UI test also uses Task.Delay(2000).Wait(). The expert reviewer correctly identified this as timing-dependent. The one-shot reviewer refinement replaced it with retry polling, but that combined candidate failed the focused scenario, so its test change cannot be presented as successfully validated in this run.
Required Direction
Adopt the try-fix-2 production mechanism—compare the prospective sizeThatFits.Height to _lastArrangedHeight—then obtain a real passing Category=Editor device-test result before merge. Separately replace the fixed delay with a deterministic layout-state wait that is validated without changing the repro outcome. Current public check-run data was still pending for relevant iOS device/UI jobs, so it does not close either gap.
🔗 Regression Cross-Reference
🔍 Regression Cross-Reference
⚠ Overlaps with prior bug-fix PRs — same files modified, but no exact line revert detected.
| File | Fix PR | Fixed issue(s) |
|---|---|---|
src/Core/src/Handlers/Editor/EditorHandler.iOS.cs |
#35662 | #35615 |
🧪 Regression Tests to Verify
These tests were added by the overlapping fix PRs. Running them to verify no side-effect regressions:
| Fix PR | Type | Test | Filter |
|---|---|---|---|
| #35662 | DeviceTest | EditorTests | Category=Editor |
🧪 Regression Test Results
❌ FAILED — 0 passed, 1 failed, 0 skipped
| Fix PR | Test | Type | Result |
|---|---|---|---|
| #35662 | EditorTests | DeviceTest | ❌ FAILED |
📱 UI Tests — Editor,ViewBaseTests
Detected UI test categories: Editor,ViewBaseTests
❌ Deep UI tests — 195 passed, 4 failed, 4 skipped across 2 categories on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
Editor |
83/91 (4 ❌, 4 skipped) | 4 diff PNGs |
ViewBaseTests |
112/112 ✓ | — |
🔍 AI analysis of failures — PR-related vs unrelated
🔍 AI-generated triage (GitHub Copilot CLI) — a heuristic judgement of whether each deep UI test failure is connected to this PR's changes. Verify before relying on it.
Likely PR-related: one or more failures appear connected to this PR's changes.
- ✗ PR-related — iOS Editor visual layout snapshots (4 tests): all failures exercise Editor sizing or alignment on iOS, and the PR changes the iOS Editor handler's desired-height cap in a way that can consistently alter the rendered geometry these screenshots assert.
Strongest signal: the identical 6.01% mismatch across all four Editor snapshots indicates a systematic rendering change in the exact platform and control modified by the PR.
❌ Editor — 4 failed tests
VerifyEditorVerticalTextAlignmentBasedOnCharacterSpacing
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyEditorVerticalTextAlignmentBasedOnCharacterSpacing.png (6.01% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 480
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String na
...
VerifyEditorHorizontalTextAlignmentWhenVerticalTextAlignmentSet
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyEditorHorizontalTextAlignmentWhenVerticalTextAlignmentSet.png (6.01% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 480
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(St
...
VerifyEditorTextWhenAlignedVertically
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyEditorTextWhenAlignedVertically.png (6.01% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 480
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retr
...
VerifyEditorWhenHeightRequestSet
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyEditorWhenHeightRequestSet.png (6.01% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 480
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDela
...
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)
🧭 Next Steps — alternative fix proposed (try-fix-2)
Automated review — alternative fix proposed
The expert-reviewer evaluation compared the PR fix against automatically generated candidates and selected try-fix-2 as the strongest fix.
Why: try-fix-2 passed the focused Issue38802 rotation test and uses the prospective SizeThatFits height to avoid the submitted equality over-cap. Its mandatory Editor regression run was blocked by an AOT startup failure, so it is the strongest relative candidate but still requires a real passing regression run before merge.
Please consider applying the candidate diff below (or use it as guidance). Once you push an update, this workflow will re-trigger and re-evaluate.
Candidate diff (try-fix-2)
diff --git a/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs b/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
index 57e38e4685..cbf1b6f8cf 100644
--- a/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
+++ b/src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
@@ -101,7 +101,7 @@ namespace Microsoft.Maui.Handlers
if (!PlatformView.AllowAutoGrowth
&& currentHeight > 0
- && PlatformView.ContentSize.Height > currentHeight)
+ && sizeThatFits.Height > currentHeight)
{
heightConstraint = currentHeight; // real MAUI-arranged bound — cap will apply
}
This comment has been minimized.
This comment has been minimized.
|
Warning Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding. What happenedThe threat detection results could not be parsed. Review the workflow run logs for details. Tests Failure Analysis
🧪 CI Analysis — click to expand📊 maui-prNo failures found. 🧪 maui-pr-devicetests
🧪 maui-pr-uitestsFive-run
🧭 Follow-up — actions and refreshNext action: Compare the minimum-height test with
|
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 whether this change resolves your issue. Thank you!
Root cause:
Editoris remeasured with an infinite height constraint. When the nativeContentSize.Heightis equal to the previously arranged height, the existing strict > check does not preserve the current height.Changes made:
Test coverage improvements:
Issue38802inTestCases.HostAppthat binds anEditor'sCharacterSpacingto aSliderand describes manual steps to reproduce and verify the issue.Issue38802inTestCases.Shared.Testswhich programmatically rotates the device and asserts that the Editor's height remains unchanged after rotation.Issues Fixed
Fixes #38802
Tested the behavior in the following platforms
BeforeFix38802.mov
AfterFix38802.mov