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.
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: https://github.com/xamarin/Xamarin.Forms/issues/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