Skip to content

[iOS 26] CarouselView PreviousPosition/PreviousItem incorrect during animated ScrollTo in CarouselViewHandler2 #34965

Open

Description

Description

On iOS 26, CarouselView.ScrollTo() with animation produces incorrect PreviousPosition and PreviousItem values in PositionChangedEventArgs and CurrentItemChangedEventArgs. For example, scrolling from position 3 to 1 reports PreviousPosition = 2 instead of 3.

This is caused by a behavior change in UICollectionView.ScrollToItem() on iOS 26, where UIScrollViewDelegate.Scrolled now fires for every intermediate position during animation (e.g., position 2 while animating from 3 to 1). On iOS 18 and earlier, callbacks were triggered only for the final settled position.

These intermediate callbacks reach CarouselViewController2.SetPosition(), which commits each transient position, resulting in incorrect PreviousPosition and PreviousItem values.

The existing CarouselView handler (CarouselViewController / Items1) already includes a _gotoPosition guard in SetPosition() to suppress intermediate updates. However, the newer handler (CarouselViewController2 / Items2) does not have this guard, leading to the issue.

Note: Reproducible only on iOS 26+; works correctly on iOS 18.5 and earlier.

Steps to Reproduce

  1. Navigate to Issue29544 test page in TestCases.HostApp
  2. Tap ScrollTo(3) — carousel scrolls to Item 4, Position = 3
  3. Tap ScrollTo(1) — carousel scrolls to Item 2, Position = 1
  4. Check Previous Position label

Expected: Previous Position = 3 Actual on iOS 26: Previous Position = 2

This does not reproduce on iOS 18.5 — Previous Position correctly shows 3.

Link to public reproduction project repository

Uses existing Issue29544 HostApp test page in dotnet/maui repository

Version with bug

10.0.0

Is this a regression from previous behavior?

Yes, this worked on iOS 18 and earlier

Last version that worked well

Works on iOS 18.

Affected platforms

iOS

Affected platform versions

iOS 26.0, 26.1, 26.2

Did you find any workaround?

No response

Relevant log output

Activity

  1. Ahamed-Ali commented on Apr 15, 2026

    @Ahamed-Ali
    Contributor

    This issue has been validated in Visual Studio Code 1.114.0 with MAUI versions 10.0.0 and 10.0.51. The issue is reproducible on iOS 26+ platform only — iOS 18.5 and earlier are not affected.

  2. added
    s/verifiedVerified / Reproducible Issue ready for Engineering Triage
    s/triagedIssue has been reviewed
    on Apr 15, 2026
  3. added this to the .NET 10.0 SR8 milestone on Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions