Skip to content

[iOS][CV2] Fix CollectionView2 on iOS iPad jumps/scrolls randomly when item size changes - #32874

Merged
kubaflo merged 3 commits into
dotnet:inflight/currentfrom
devanathan-vaithiyanathan:fix-32796
Jun 30, 2026
Merged

[iOS][CV2] Fix CollectionView2 on iOS iPad jumps/scrolls randomly when item size changes#32874
kubaflo merged 3 commits into
dotnet:inflight/currentfrom
devanathan-vaithiyanathan:fix-32796

Conversation

@devanathan-vaithiyanathan

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Nov 27, 2025

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

In CollectionView2, when an item’s size changes, the CollectionView jumps or scrolls unexpectedly instead of keeping its current position.

Description of Change

Replaced the cell update logic from invalidateLayout to reconfigureItems for the affected cell.
reconfigureItems (iOS 15+) is lighter and works correctly on iPad iOS 26.

Issues Fixed

Fixes #32796
Fixes #33833

Regarding test case

Since the issue reproduces only on iPadOS 26, I haven’t added a test case.

Tested the behavior in the following platforms.

  • Android
  • Windows
  • iOS
  • Mac
Before After
iOS
Before.mov
iOS
After.mov

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Nov 27, 2025
@karthikraja-arumugam karthikraja-arumugam added the community ✨ Community Contribution label Dec 4, 2025
@devanathan-vaithiyanathan
devanathan-vaithiyanathan marked this pull request as ready for review February 5, 2026 12:08
Copilot AI review requested due to automatic review settings February 5, 2026 12:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 CollectionView2 issue on iPad where the view jumps or scrolls unexpectedly when item sizes change. The fix replaces the cell invalidation approach from using InvalidateLayout to using ReconfigureItems (iOS 15+), which is designed to handle size changes more efficiently without full cell recreation.

Changes:

  • Adds a new code path that uses ReconfigureItems for iOS 15+ when cells need layout invalidation
  • Wraps the reconfiguration in UIView.PerformWithoutAnimation to prevent visual artifacts
  • Falls back to the existing InvalidateLayout approach for older iOS versions

Comment thread src/Controls/src/Core/Handlers/Items2/iOS/ItemsViewController2.cs
Comment thread src/Controls/src/Core/Handlers/Items2/iOS/ItemsViewController2.cs Outdated
Comment thread src/Controls/src/Core/Handlers/Items2/iOS/ItemsViewController2.cs Outdated
@rmarinho rmarinho added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-gate-failed AI could not verify tests catch the bug s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Feb 18, 2026
@kubaflo kubaflo added s/agent-fix-lose Author adopted the agent's fix and it turned out to be bad s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates and removed s/agent-fix-win AI found a better alternative fix than the PR s/agent-fix-lose Author adopted the agent's fix and it turned out to be bad labels Feb 20, 2026
@devanathan-vaithiyanathan

Copy link
Copy Markdown
Contributor Author

🤖 AI Summary

📊 Expand Full Review
🔍 Pre-Flight — Context & Validation
📝 Review Sessionfix modified for #33833 · a88fe75
Issue: #32796 - CollectionView2 on iOS iPad jumps/scrolls randomly when item size changes (iOS 26.0) Issue (2): #33833 - [iOS] Grouped CollectionView scroll jump/skip during normal scrolling (iOS 18.7.3) PR: #32874 - [iOS][CV2] Fix CollectionView2 on iOS iPad jumps/scrolls randomly when item size changes Platforms Affected: iOS / iPadOS (iPad-specific reproduction, also affects MacCatalyst due to .ios.cs file scope) Files Changed: 1 implementation file (no test files)

Issue Summary

In CollectionView2, when an item's size changes at runtime (e.g., expand/collapse), the CollectionView unexpectedly jumps or scrolls to a different position instead of maintaining the current scroll offset. Reproducible on iPad/iPadOS 18+ / iOS 26, NOT reproducible on iPhone. Two separate issues with the same root cause.

Fix Approach (PR)

In ItemsViewController2.InvalidateLayoutIfItemsMeasureChanged(), instead of calling InvalidateLayout on the layout context for cells with changed sizes, the PR introduces:

  • A new ShouldApplyCellReConfiguration() static method that returns true for iOS 15+
  • When true: calls collectionView.ReconfigureItems(...) wrapped in UIView.PerformWithoutAnimation
  • This uses the iOS 15+ API specifically designed for cell content updates without recreation, avoiding scroll position disruption

Reviewer Comments (from copilot-pull-request-reviewer)

File:Line Reviewer Says Author Says Status
ItemsViewController2.cs:248 ShouldApplyCellReConfiguration() should also check OperatingSystem.IsMacCatalystVersionAtLeast(15) since .ios.cs compiles for both platforms N/A ⚠️ NEEDS FIX
ItemsViewController2.cs:227 Comment says "Apple bug in iPadOS 18+" but no bug reference (radar/forum) N/A ⚠️ NEEDS UPDATE
ItemsViewController2.cs:226 Comment says "iPadOS 18+" but linked issue #32796 says "iOS 26.0" (same version, different naming) N/A ⚠️ NEEDS CLARIFICATION

Code Issues Identified

  1. Missing MacCatalyst version check: ShouldApplyCellReConfiguration() returns OperatingSystem.IsIOSVersionAtLeast(15) only. Since ItemsViewController2.cs has a .ios.cs extension (compiles for both iOS and MacCatalyst), it must also check OperatingSystem.IsMacCatalystVersionAtLeast(15). The existing pattern at line 165-171 of the same file demonstrates the correct approach: OperatingSystem.IsIOSVersionAtLeast(11) || OperatingSystem.IsMacCatalystVersionAtLeast(11).
  2. Version comment inconsistency: "iPadOS 18+" and "iOS 26.0" refer to the same OS (Apple rebranded iOS 18 as iOS 26). Should be clarified.

Fix Candidates

Source Approach Test Result Files Changed Notes

PR PR #32874 Use ReconfigureItems (iOS 15+) instead of InvalidateLayout for cells with changed sizes, wrapped in PerformWithoutAnimation ⏳ PENDING (Gate) ItemsViewController2.cs (+19) Missing MacCatalyst check in ShouldApplyCellReConfiguration()
🚦 Gate — Test Verification
📝 Review Sessionfix modified for #33833 · a88fe75
Result: ❌ FAILED - No tests exist Platform: ios Mode: N/A - Tests not present

Findings

Impact

Gate FAILED. Cannot verify that automated tests catch the regression. The PR has no automated test coverage.

🔧 Fix — Analysis & Comparison
📝 Review Sessionfix modified for #33833 · a88fe75
Skipped: Gate FAILED (no tests found), Phase 3 was not executed per workflow rules.

Exhausted: N/A (skipped) Selected Fix: PR's fix (Gate did not pass; no alternative exploration performed. The PR's fix was evaluated via code review only.)

📋 Report — Final Recommendation
📝 Review Sessionfix modified for #33833 · a88fe75

⚠️ Final Recommendation: REQUEST CHANGES

Summary

PR #32874 addresses a real and verified bug in CollectionView2 where item size changes cause unexpected scroll position jumps on iPad/iOS. The fix approach (using ReconfigureItems instead of InvalidateLayout) is conceptually sound and aligns with Apple's recommended API for this use case. However, the PR has two blocking issues that must be addressed before it can be merged.

Root Cause

In ItemsViewController2.InvalidateLayoutIfItemsMeasureChanged(), when visible cells have changed sizes, the code calls InvalidateLayout on a UICollectionViewLayoutInvalidationContext. On iPadOS/iOS 18+ (a.k.a. iOS 26) with UICollectionViewCompositionalLayout, this causes UIKit to recalculate layout and disrupt the current scroll offset. The ReconfigureItems API (iOS 15+) is the correct replacement: it triggers a reconfigure callback on the cell without full layout invalidation, preserving scroll position.

Fix Quality

The core fix is reasonable — ReconfigureItems wrapped in PerformWithoutAnimation is the right mechanism to update cell content/size while avoiding scroll jumps. However:

Issue 1 (Blocking): Missing MacCatalyst version check

ShouldApplyCellReConfiguration() currently reads:

static bool ShouldApplyCellReConfiguration()
{
    return OperatingSystem.IsIOSVersionAtLeast(15);
}

Since ItemsViewController2.cs uses the .ios.cs extension, it compiles for both iOS and MacCatalyst. The ReconfigureItems API requires macOS Catalyst 15.0+. Without the MacCatalyst check, on MacCatalyst < 15 the code will either fail or fall through to the old path unexpectedly. The existing pattern at line 165-171 of the same file demonstrates the correct approach:

static bool ShouldApplyCellReConfiguration()
{
    return OperatingSystem.IsIOSVersionAtLeast(15)
        || OperatingSystem.IsMacCatalystVersionAtLeast(15);
}

Issue 2 (Blocking): No automated tests

The PR author states the issue only reproduces on iPadOS 26. While visual scroll jump behavior is hard to test automatically, the underlying code path (InvalidateLayoutIfItemsMeasureChanged) can be unit tested or device-tested by simulating a cell size change event. Lack of tests means regressions could go undetected.

Non-blocking observations:

  • The comment "Apple bug in iPadOS 18+" vs the issue saying "iOS 26.0" is potentially confusing (these are the same OS under different names). Suggest updating to "UICollectionViewCompositionalLayout layout invalidation issue on iPadOS 18+ (also known as iOS 26)" or similar.
  • No Apple bug report reference is provided. If one exists, it should be included for future maintainers.
  • The version gating is very broad: IsIOSVersionAtLeast(15) means ALL iOS 15+ users get the new code path. This might be intentional (the new path is strictly better), but it would be worth confirming the author tested on both newer and older iOS versions.

Required Changes

  1. Fix ShouldApplyCellReConfiguration() to include the MacCatalyst check:
    static bool ShouldApplyCellReConfiguration()
    {
        return OperatingSystem.IsIOSVersionAtLeast(15)
            || OperatingSystem.IsMacCatalystVersionAtLeast(15);
    }
  2. Add automated tests - even a basic UI test that changes an item's bound height and verifies the CollectionView scroll position remains stable would provide regression coverage. The write-tests-agent can help.
  3. Update comments to resolve the "iPadOS 18+" vs "iOS 26" naming confusion and remove the "Apple bug" framing if no bug report number is available.

📋 Expand PR Finalization Review

The issue reproduces only on iPad and not on the Mac version. Therefore, the agent’s suggestion is not applicable.

@kubaflo kubaflo removed s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-gate-failed AI could not verify tests catch the bug labels Feb 25, 2026
@MauiBot MauiBot added the s/agent-changes-requested AI agent recommends changes - found a better alternative or issues label Mar 29, 2026
@PaoloPorcellatoTC

Copy link
Copy Markdown

Hi, @devanathan-vaithiyanathan are there any available artifacts or binary to test? I'm not able to find them into pipeline artifacts

@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 32874

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 32874"

@dotnet dotnet deleted a comment from rmarinho May 14, 2026
@dotnet dotnet deleted a comment from MauiBot May 14, 2026
@MauiBot MauiBot added s/agent-review-incomplete and removed s/agent-changes-requested AI agent recommends changes - found a better alternative or issues labels May 14, 2026
@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jun 25, 2026
@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jun 25, 2026
@kubaflo
kubaflo force-pushed the inflight/current branch from 81295ab to 34a8f02 Compare June 25, 2026 20:02
KarthikRajaKalaimani and others added 3 commits June 29, 2026 12:42
…net#34527)

<!-- 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!

### Issue Details:

Horizontalspacing / Verticalspacing is not not applied to the first
column in GridItemLayout using CollectionView on Android platform.
        
### Root Cause:

The grid spacing was not being distributed symmetrically across the
active layout implementations, so edge items did not fully participate
when spacing changed at runtime.

### Description of Change:

- On Android, the fix in MauiRecyclerView.cs changes how RecyclerView
padding is handled for GridItemsLayout. Android was already using
SpacingItemDecoration, which applies half-spacing on all four sides of
each item. Previously, negative RecyclerView padding canceled that
spacing at the control edges. The branch keeps that negative-padding
behavior for non-grid layouts, but disables it for GridItemsLayout,
allowing the grid’s half-spacing to remain visible at the outer
perimeter. This makes the first row and first column visually respond
when spacing changes, but it also changes the grid behavior from spacing
only between items to spacing around the outside edges as well.

**Tested the behavior in the following platforms:**

- [x] Android
- [x] Windows
- [ ] iOS
- [ ] Mac

### Reference:

N/A

### Issues Fixed:

Fixes  dotnet#34257      

### Screenshots
| Before  | After  |
|---------|--------|
| <Video
src="https://github.com/user-attachments/assets/578dda69-1d60-474c-a6d8-23b3f9d29a50"
Width="300" Height="600"> | <Video
src="https://github.com/user-attachments/assets/7f3826e6-5922-4b6f-a6b9-de581b7db6c3"
Width="300" Height="600"> |
…n item size changes

Use ReconfigureItems (iOS 15+/MacCatalyst 15+) instead of InvalidateLayout for cells
with changed sizes, wrapped in PerformWithoutAnimation to prevent scroll position jumps
on iPadOS 18+ with UICollectionViewCompositionalLayout.

Fixes dotnet#32796
Fixes dotnet#33833
@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jun 29, 2026
@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jun 29, 2026
@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added s/agent-ready-for-rerun AI review has a new PR-author comment or commit and is ready for rerun s/agent-review-in-progress AI review is currently running for this PR and removed s/agent-ready-for-rerun AI review has a new PR-author comment or commit and is ready for rerun labels Jun 29, 2026
@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jun 29, 2026
@kubaflo
kubaflo merged commit 2b8206a into dotnet:inflight/current Jun 30, 2026
4 of 36 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR9 milestone Jun 30, 2026
kubaflo pushed a commit that referenced this pull request Jul 3, 2026
…n item size changes (#32874)

<!-- 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. !!!!!!!
-->
### Issue Details
In CollectionView2, when an item’s size changes, the CollectionView
jumps or scrolls unexpectedly instead of keeping its current position.

### Description of Change

<!-- Enter description of the fix in this section -->
Replaced the cell update logic from invalidateLayout to reconfigureItems
for the affected cell.
reconfigureItems (iOS 15+) is lighter and works correctly on iPad iOS
26.

### 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 #32796 
Fixes #33833 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Regarding test case
Since the issue reproduces only on iPadOS 26, I haven’t added a test
case.

**Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [ ] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/6b3d1860-fa1d-4085-a0f9-e57f48eea1ff"
width="400" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/89036aa6-010c-4c64-b4de-e7a503579c6f"
width="400" height="600"> |

---------

Co-authored-by: KarthikRajaKalaimani <92777139+KarthikRajaKalaimani@users.noreply.github.com>
@kubaflo kubaflo mentioned this pull request Jul 6, 2026
kubaflo pushed a commit that referenced this pull request Jul 6, 2026
…n item size changes (#32874)

<!-- 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. !!!!!!!
-->
### Issue Details
In CollectionView2, when an item’s size changes, the CollectionView
jumps or scrolls unexpectedly instead of keeping its current position.

### Description of Change

<!-- Enter description of the fix in this section -->
Replaced the cell update logic from invalidateLayout to reconfigureItems
for the affected cell.
reconfigureItems (iOS 15+) is lighter and works correctly on iPad iOS
26.

### 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 #32796 
Fixes #33833 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Regarding test case
Since the issue reproduces only on iPadOS 26, I haven’t added a test
case.

**Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [ ] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/6b3d1860-fa1d-4085-a0f9-e57f48eea1ff"
width="400" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/89036aa6-010c-4c64-b4de-e7a503579c6f"
width="400" height="600"> |

---------

Co-authored-by: KarthikRajaKalaimani <92777139+KarthikRajaKalaimani@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Jul 7, 2026
…n item size changes (#32874)

<!-- 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. !!!!!!!
-->
### Issue Details
In CollectionView2, when an item’s size changes, the CollectionView
jumps or scrolls unexpectedly instead of keeping its current position.

### Description of Change

<!-- Enter description of the fix in this section -->
Replaced the cell update logic from invalidateLayout to reconfigureItems
for the affected cell.
reconfigureItems (iOS 15+) is lighter and works correctly on iPad iOS
26.

### 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 #32796 
Fixes #33833 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Regarding test case
Since the issue reproduces only on iPadOS 26, I haven’t added a test
case.

**Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [ ] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/6b3d1860-fa1d-4085-a0f9-e57f48eea1ff"
width="400" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/89036aa6-010c-4c64-b4de-e7a503579c6f"
width="400" height="600"> |

---------

Co-authored-by: KarthikRajaKalaimani <92777139+KarthikRajaKalaimani@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Jul 7, 2026
…n item size changes (#32874)

<!-- 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. !!!!!!!
-->
### Issue Details
In CollectionView2, when an item’s size changes, the CollectionView
jumps or scrolls unexpectedly instead of keeping its current position.

### Description of Change

<!-- Enter description of the fix in this section -->
Replaced the cell update logic from invalidateLayout to reconfigureItems
for the affected cell.
reconfigureItems (iOS 15+) is lighter and works correctly on iPad iOS
26.

### 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 #32796 
Fixes #33833 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Regarding test case
Since the issue reproduces only on iPadOS 26, I haven’t added a test
case.

**Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [ ] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/6b3d1860-fa1d-4085-a0f9-e57f48eea1ff"
width="400" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/89036aa6-010c-4c64-b4de-e7a503579c6f"
width="400" height="600"> |

---------

Co-authored-by: KarthikRajaKalaimani <92777139+KarthikRajaKalaimani@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Jul 10, 2026
…n item size changes (#32874)

<!-- 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. !!!!!!!
-->
### Issue Details
In CollectionView2, when an item’s size changes, the CollectionView
jumps or scrolls unexpectedly instead of keeping its current position.

### Description of Change

<!-- Enter description of the fix in this section -->
Replaced the cell update logic from invalidateLayout to reconfigureItems
for the affected cell.
reconfigureItems (iOS 15+) is lighter and works correctly on iPad iOS
26.

### 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 #32796 
Fixes #33833 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Regarding test case
Since the issue reproduces only on iPadOS 26, I haven’t added a test
case.

**Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [ ] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/6b3d1860-fa1d-4085-a0f9-e57f48eea1ff"
width="400" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/89036aa6-010c-4c64-b4de-e7a503579c6f"
width="400" height="600"> |

---------

Co-authored-by: KarthikRajaKalaimani <92777139+KarthikRajaKalaimani@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Jul 15, 2026
…n item size changes (#32874)

<!-- 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. !!!!!!!
-->
### Issue Details
In CollectionView2, when an item’s size changes, the CollectionView
jumps or scrolls unexpectedly instead of keeping its current position.

### Description of Change

<!-- Enter description of the fix in this section -->
Replaced the cell update logic from invalidateLayout to reconfigureItems
for the affected cell.
reconfigureItems (iOS 15+) is lighter and works correctly on iPad iOS
26.

### 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 #32796 
Fixes #33833 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Regarding test case
Since the issue reproduces only on iPadOS 26, I haven’t added a test
case.

**Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [ ] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/6b3d1860-fa1d-4085-a0f9-e57f48eea1ff"
width="400" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/89036aa6-010c-4c64-b4de-e7a503579c6f"
width="400" height="600"> |

---------

Co-authored-by: KarthikRajaKalaimani <92777139+KarthikRajaKalaimani@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Jul 22, 2026
…n item size changes (#32874)

<!-- 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. !!!!!!!
-->
### Issue Details
In CollectionView2, when an item’s size changes, the CollectionView
jumps or scrolls unexpectedly instead of keeping its current position.

### Description of Change

<!-- Enter description of the fix in this section -->
Replaced the cell update logic from invalidateLayout to reconfigureItems
for the affected cell.
reconfigureItems (iOS 15+) is lighter and works correctly on iPad iOS
26.

### 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 #32796 
Fixes #33833 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Regarding test case
Since the issue reproduces only on iPadOS 26, I haven’t added a test
case.

**Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [ ] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/6b3d1860-fa1d-4085-a0f9-e57f48eea1ff"
width="400" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/89036aa6-010c-4c64-b4de-e7a503579c6f"
width="400" height="600"> |

---------

Co-authored-by: KarthikRajaKalaimani <92777139+KarthikRajaKalaimani@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Jul 28, 2026
…n item size changes (#32874)

<!-- 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. !!!!!!!
-->
### Issue Details
In CollectionView2, when an item’s size changes, the CollectionView
jumps or scrolls unexpectedly instead of keeping its current position.

### Description of Change

<!-- Enter description of the fix in this section -->
Replaced the cell update logic from invalidateLayout to reconfigureItems
for the affected cell.
reconfigureItems (iOS 15+) is lighter and works correctly on iPad iOS
26.

### 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 #32796 
Fixes #33833 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Regarding test case
Since the issue reproduces only on iPadOS 26, I haven’t added a test
case.

**Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [ ] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/6b3d1860-fa1d-4085-a0f9-e57f48eea1ff"
width="400" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/89036aa6-010c-4c64-b4de-e7a503579c6f"
width="400" height="600"> |

---------

Co-authored-by: KarthikRajaKalaimani <92777139+KarthikRajaKalaimani@users.noreply.github.com>
kubaflo pushed a commit that referenced this pull request Jul 29, 2026
…n item size changes (#32874)

<!-- 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. !!!!!!!
-->
### Issue Details
In CollectionView2, when an item’s size changes, the CollectionView
jumps or scrolls unexpectedly instead of keeping its current position.

### Description of Change

<!-- Enter description of the fix in this section -->
Replaced the cell update logic from invalidateLayout to reconfigureItems
for the affected cell.
reconfigureItems (iOS 15+) is lighter and works correctly on iPad iOS
26.

### 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 #32796 
Fixes #33833 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

### Regarding test case
Since the issue reproduces only on iPadOS 26, I haven’t added a test
case.

**Tested the behavior in the following platforms.**
- [ ] Android
- [ ] Windows
- [x] iOS
- [ ] Mac

| Before  | After  |
|---------|--------|
| **iOS**<br> <video
src="https://github.com/user-attachments/assets/6b3d1860-fa1d-4085-a0f9-e57f48eea1ff"
width="400" height="600"> | **iOS**<br> <video
src="https://github.com/user-attachments/assets/89036aa6-010c-4c64-b4de-e7a503579c6f"
width="400" height="600"> |

---------

Co-authored-by: KarthikRajaKalaimani <92777139+KarthikRajaKalaimani@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-collectionview CollectionView, CarouselView, IndicatorView collectionview-cv2 community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] Grouped CollectionView scroll jump/skip during normal scrolling CollectionView2 on iOS iPad jumps/scrolls randomly when item size changes

10 participants