[Inflight/Candidate][iOS] Fix for ShouldIgnoreBottomContentInsetForCollectionViewItems - Editor cells becoming invisible in CollectionView (CV1) - #36107
Merged
Conversation
…cells by tracking the last MAUI-arranged height through a PlatformArrange override instead of using Bounds.Height, preventing transient UIKit placeholder frames from collapsing Editor cells to an invisible size.
BagavathiPerumal
temporarily deployed
to
gh-aw-agents
June 24, 2026 13:51 — with
GitHub Actions
Inactive
BagavathiPerumal
temporarily deployed
to
gh-aw-agents
June 24, 2026 13:53 — with
GitHub Actions
Inactive
BagavathiPerumal
temporarily deployed
to
gh-aw-agents
June 24, 2026 13:54 — with
GitHub Actions
Inactive
BagavathiPerumal
temporarily deployed
to
gh-aw-agents
June 24, 2026 13:54 — with
GitHub Actions
Inactive
sheiksyedm
marked this pull request as ready for review
June 24, 2026 14:51
Merged
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!
Issue details
When using an Editor inside a CollectionView with the legacy handler (CV1) on iOS, the Editor cells collapse and become invisible after the user taps on them to begin typing.
Root Cause of the Regression
The issue occurs because of the scrollability cap introduced in EditorHandler.GetDesiredSize by PR #35309. This cap was added to prevent Editors from growing unboundedly when AllowAutoGrowth = false. However, the native layout container assigns a transient placeholder height of 1pt directly to MauiTextView.Bounds via UIKit, completely bypassing MAUI's PlatformArrange pipeline. When the keyboard appears and the layout invalidates, GetDesiredSize is called and the cap reads Bounds.Height = 1 > 0 and ContentSize.Height = 36 > 1, both true, so it fires incorrectly, capping every Editor cell to 1pt and making them invisible.
Description of Change
The fix involves overriding PlatformArrange in EditorHandler to track the last MAUI-arranged height in a _lastArrangedHeight field, and using that value instead of PlatformView.Bounds.Height inside the scrollability cap condition. Since the native layout container assigns the placeholder height directly via UIKit without going through PlatformArrange, _lastArrangedHeight remains 0 until MAUI explicitly arranges the view.
The cap condition currentHeight > 0 therefore evaluates to false for placeholder frames, skipping the cap automatically. Once MAUI arranges the view with a real height, _lastArrangedHeight is updated and the cap applies correctly for all subsequent measure passes, Editors outside a CollectionView are completely unaffected.
Regression PR: #35309
Issues Fixed
iOS UI Test: CV1: ShouldIgnoreBottomContentInsetForCollectionViewItems