Xamarin.forms: [Bug] [iOS] ListView item selection with RecycleElement does not work

Created on 3 Apr 2020  路  8Comments  路  Source: xamarin/Xamarin.Forms

Using the latest Visual Studio For Mac version (8.5.1 build 42) which includes Xamarin.iOS 13.16.
ListViews with RecycleElement that used to allow item selection (on Xamarin.iOS 13.14 and previous VS For Mac version) no longer work.
ItemTapped and ItemSelected events and bindings to SelectedItemProperty no longer fire. None of them are called. When you remove RecycleElement (default to RetainElement) then they will work.
This was tested in XAML and programmatically. RecycleElementAndDataTemplate was not tested.

Steps to Reproduce

  1. Create a ListView on a page with an item source of 1+ items
  2. Define the caching method as RecycleElement
  3. Add an event to ItemTapped, ItemSelected, or bind to SelectedItem
  4. Load the app on iOS and try to select the items

Expected Behavior

ItemTapped, ItemSelected, and SelectedItem are all called.

Actual Behavior

ItemTapped, ItemSelected, and SelectedItem are not called.

Basic Information

  • Platform Target Frameworks:

    • iOS: Targeting 8.2, running on 13.4

  • Affected Devices: Simulator at least
unverified bug

Most helpful comment

@2trogers Thanks for checking!!! We'll have the fix out as soon as we can.

All 8 comments

Same here: ItemTapped/ItemSelected events no longer fire.

VS Mac 8.5.1 b42
Xamarin.iOS Version: 13.16.0.11

Definitely not working on Simulator.

I have this working fine on a real Device but not a 13.4 Simulator

I had it yesterday and I solved by downgrading the xamarin.iOS.Framework to version 13.14.1.39 that you can find at https://aka.ms/xvs/pkg/macios/13.14.1.39

Remove the current framework from /Library/Frameworks and install this pkg

Duplicate of #10162

@samhouts I hope this is a duplicate. The tapping works when the cache method is set to RetainElement so it doesn't seem to be the same but I have not dug into how Xamarin handles gestures on lists.

@2trogers if you are able to test with an older simulator version (anything less than 13.4), you can verify that it's this bug. :)

@samhouts Good call, works on 13.3. Thanks for identifying it correctly!

@2trogers Thanks for checking!!! We'll have the fix out as soon as we can.

Was this page helpful?
0 / 5 - 0 ratings