Skip to content

[Inflight/Candidate][iOS] Fix for ShouldIgnoreBottomContentInsetForCollectionViewItems - Editor cells becoming invisible in CollectionView (CV1) - #36107

Merged
kubaflo merged 1 commit into
dotnet:inflight/candidatefrom
BagavathiPerumal:fix-ShouldIgnoreBottomContentInsetForCollectionViewItems-CV1-failure
Jun 24, 2026
Merged

[Inflight/Candidate][iOS] Fix for ShouldIgnoreBottomContentInsetForCollectionViewItems - Editor cells becoming invisible in CollectionView (CV1)#36107
kubaflo merged 1 commit into
dotnet:inflight/candidatefrom
BagavathiPerumal:fix-ShouldIgnoreBottomContentInsetForCollectionViewItems-CV1-failure

Conversation

@BagavathiPerumal

Copy link
Copy Markdown
Contributor

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

…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.
@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jun 24, 2026
@BagavathiPerumal BagavathiPerumal added community ✨ Community Contribution and removed partner/syncfusion Issues / PR's with Syncfusion collaboration labels Jun 24, 2026
@sheiksyedm
sheiksyedm marked this pull request as ready for review June 24, 2026 14:51
@sheiksyedm
sheiksyedm requested a review from kubaflo June 24, 2026 14:51
@kubaflo
kubaflo merged commit b30cdde into dotnet:inflight/candidate Jun 24, 2026
8 of 41 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR9 milestone Jun 24, 2026
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jun 29, 2026
@PureWeen PureWeen mentioned this pull request Jul 7, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-editor Editor community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios platform/macos macOS / Mac Catalyst

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants