CollectionView.Scrolled event offset isn't correctly reset when items change on Android #21708
Labels
area-controls-collectionview
CollectionView, CarouselView, IndicatorView
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
partner/syncfusion
Issues / PR's with Syncfusion collaboration
platform/android 🤖
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
When changing the contents of the
CollectionView.ItemsSource
while scrolled down into the list,ItemsViewScrolledEventArgs.VerticalOffset
is not correctly updated in Android.Offset "0" should be at the start of the collection; instead the start offsets changes as items are added/removed. It manifests only when the collection is scrolled to after the position of the added/deleted items.
This issue was known and fixed in Xamarin.Forms: xamarin/Xamarin.Forms#7993 . It has reappeared in MAUI.
The repro app is adapted from the Xamarin issue.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/nshtinkov/MauiScrollOffsetAndroidBug
Version with bug
8.0.7 SR2
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 13
Did you find any workaround?
Replacing the
ItemsSource
collection after change seems to work, e.g. in the repro app:Relevant log output
No response
The text was updated successfully, but these errors were encountered: