Repository navigation
[inflight/candidate] [iOS] Editor can't be scrolled after rotating simulator. - #39318
Merged
kubaflo merged 1 commit intoOct 12, 2026
Merged
Conversation
<!-- Please keep the note below for people who find this PR --> > [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! ### Root cause: - During rotation, the `Editor` is remeasured with an infinite height constraint. When the native `ContentSize.Height` is equal to 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 scrolling. ### Changes made: - Fixed the logic in `EditorHandler.iOS.cs` to use `sizeThatFits.Height` instead of `PlatformView.ContentSize.Height` when determining if the `Editor` should cap its height, preventing the `Editor` from growing unexpectedly after device rotation. - Prevents the Editor from expanding to its full reflowed content height and preserves vertical scrolling after rotation. **Test coverage improvements:** * Added a new test page `Issue38802` in `TestCases.HostApp` that binds an `Editor`'s `CharacterSpacing` to a `Slider` and describes manual steps to reproduce and verify the issue. * Added an automated UI test for `Issue38802` in `TestCases.Shared.Tests` which programmatically rotates the device and asserts that the Editor's height remains unchanged after rotation. <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #38802 ### Tested the behavior in the following platforms - [ ] Windows - [ ] Android - [x] iOS - [ ] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/68841ca7-ec01-4d5f-a635-a21c18f8aa38"> | <video src="https://github.com/user-attachments/assets/3619dcdb-d406-4fa0-bbf4-48c16e94a213"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
kubaflo
added a commit
that referenced
this pull request
Oct 13, 2026
…mulator. (#39318) <!-- Please let the below note in for people that find this PR --> > [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> Backport of #39047 to `inflight/candidate` for SR12 Apple compatibility. This intentionally targets Candidate rather than `main`. Preserves Editor scrolling after device rotation by using the remeasured native `sizeThatFits.Height` when deciding whether to cap the Editor height. Includes the original Issue38802 reproduction page and automated rotation regression test unchanged. Source commit: `0c5ddc05a22704148d02d6468494f211a7c0230e`. The complete three-file source patch is preserved; no unrelated changes are included. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #38802 (backport). <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ### Validation - `git diff --check origin/inflight/candidate...origin/backport/pr-39047-to-inflight/candidate` — passed. - Source and backport diffs, including all tests, have the same `git patch-id --stable`: `636f90901cbd9aca608a2305086a28a4f7a2eb59`. - Candidate baseline: `29eb037ad1cac21acdc052bc7a1211a8bb37d3c9`; backport head: `6f961236f3df824d8e8f41c8bcbd410752f53070`. - `maui-pr` [build 1631863](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1631863) is running for this exact PR head; its result is not yet available. - Device/UI runtime tests were not rerun locally. No simulator, Appium, or XCTest was launched. /cc @kubaflo @SubhikshaSf4851 Co-authored-by: Subhiksha Chandrasekaran <subhiksha.c@syncfusion.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo
added a commit
that referenced
this pull request
Oct 14, 2026
…mulator. (#39318) <!-- Please let the below note in for people that find this PR --> > [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> Backport of #39047 to `inflight/candidate` for SR12 Apple compatibility. This intentionally targets Candidate rather than `main`. Preserves Editor scrolling after device rotation by using the remeasured native `sizeThatFits.Height` when deciding whether to cap the Editor height. Includes the original Issue38802 reproduction page and automated rotation regression test unchanged. Source commit: `0c5ddc05a22704148d02d6468494f211a7c0230e`. The complete three-file source patch is preserved; no unrelated changes are included. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #38802 (backport). <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ### Validation - `git diff --check origin/inflight/candidate...origin/backport/pr-39047-to-inflight/candidate` — passed. - Source and backport diffs, including all tests, have the same `git patch-id --stable`: `636f90901cbd9aca608a2305086a28a4f7a2eb59`. - Candidate baseline: `29eb037ad1cac21acdc052bc7a1211a8bb37d3c9`; backport head: `6f961236f3df824d8e8f41c8bcbd410752f53070`. - `maui-pr` [build 1631863](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1631863) is running for this exact PR head; its result is not yet available. - Device/UI runtime tests were not rerun locally. No simulator, Appium, or XCTest was launched. /cc @kubaflo @SubhikshaSf4851 Co-authored-by: Subhiksha Chandrasekaran <subhiksha.c@syncfusion.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
kubaflo
added a commit
that referenced
this pull request
Oct 18, 2026
…mulator. (#39318) <!-- Please let the below note in for people that find this PR --> > [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change <!-- Enter description of the fix in this section --> Backport of #39047 to `inflight/candidate` for SR12 Apple compatibility. This intentionally targets Candidate rather than `main`. Preserves Editor scrolling after device rotation by using the remeasured native `sizeThatFits.Height` when deciding whether to cap the Editor height. Includes the original Issue38802 reproduction page and automated rotation regression test unchanged. Source commit: `0c5ddc05a22704148d02d6468494f211a7c0230e`. The complete three-file source patch is preserved; no unrelated changes are included. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #38802 (backport). <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ### Validation - `git diff --check origin/inflight/candidate...origin/backport/pr-39047-to-inflight/candidate` — passed. - Source and backport diffs, including all tests, have the same `git patch-id --stable`: `636f90901cbd9aca608a2305086a28a4f7a2eb59`. - Candidate baseline: `29eb037ad1cac21acdc052bc7a1211a8bb37d3c9`; backport head: `6f961236f3df824d8e8f41c8bcbd410752f53070`. - `maui-pr` [build 1631863](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1631863) is running for this exact PR head; its result is not yet available. - Device/UI runtime tests were not rerun locally. No simulator, Appium, or XCTest was launched. /cc @kubaflo @SubhikshaSf4851 Co-authored-by: Subhiksha Chandrasekaran <subhiksha.c@syncfusion.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
4 tasks done
2 tasks done
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!
Description of Change
Backport of #39047 to
inflight/candidatefor SR12 Apple compatibility. This intentionally targets Candidate rather thanmain.Preserves Editor scrolling after device rotation by using the remeasured native
sizeThatFits.Heightwhen deciding whether to cap the Editor height. Includes the original Issue38802 reproduction page and automated rotation regression test unchanged.Source commit:
0c5ddc05a22704148d02d6468494f211a7c0230e. The complete three-file source patch is preserved; no unrelated changes are included.Issues Fixed
Fixes #38802 (backport).
Validation
git diff --check origin/inflight/candidate...origin/backport/pr-39047-to-inflight/candidate— passed.git patch-id --stable:636f90901cbd9aca608a2305086a28a4f7a2eb59.29eb037ad1cac21acdc052bc7a1211a8bb37d3c9; backport head:6f961236f3df824d8e8f41c8bcbd410752f53070.maui-prbuild 1631863 is running for this exact PR head; its result is not yet available./cc @kubaflo @SubhikshaSf4851