Skip to content

[IOS] CollectionView ScrollOffset does not reset when the ItemSource is changed in iOS. #26366

@nivetha-nagalingam

Description

@nivetha-nagalingam

Description

On iOS, when using CollectionView with the Scrolled event, the VerticalOffset value doesn't reset to 0 when changing the ItemsSource. While the collection view displays the new items correctly, the reported scroll position remains at the previous offset value instead of resetting to the top position. This issue occurs only on iOS; on other platforms, the ScrollOffset resets as expected when changing the ItemsSource.

Screen.Recording.2024-12-04.at.5.31.55.AM.mov

Environment:

Platform: iOS
Control: CollectionView
Event: Scrolled event
Property affected: VerticalOffset

Steps to Reproduce

  • Create the .net maui project with a CollectionView containing multiple items.
  • Run the application.
  • Scroll down the list - verify the VerticalOffset value increases correctly.
  • Click the "NewItemsSource" button to reset the items
  • Observe that while the CollectionView visually resets to the top, the VerticalOffset value remains at the previous scrolled position instead of resetting to 0.
  • Issue7993.zip

Link to public reproduction project repository

No response

Version with bug

9.0.10 SR1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

IPhone 18.0

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions