Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 60314 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
When tapping (or clicking) an item in a grouped listview (ListView.IsGroupingEnabled=true) on UWP, the ListView.ItemSelected and ListView.ItemTapped events are both raised twice; once for the item immediately preceding the tapped item and once for the actual selected item. This seems to happens on Windows only. On Android both events are raised just for the tapped item, as expected.
NB! This bug was introduced with v2.4 and still exists in v22.214.171.12471-pre2. It is not the same as bug 44886.
Can you please provide a reproduction and verify that you have done a full clean and rebuild of the project?
Created attachment 25396 [details]
ItemTapped called twice.
Hi, I confirm there is an issue with tap event handling on list after upgrading to 2.4. I attached sample project when ItemTapped is called twice. When I add TapGestureRecognizer in DataTemplate, both are fired - ItemTapped (but this time once) and Tapped on gesture recognizer. In Forms 2.3 behaviour was different - if there was gesture recognizer in DataTemplate, ListView's events for tapping and selecting were not fired. In my working project I have also issue with ItemSelected called twice but there is quite complex DataTemplate and I wasn't able to reproduce it in this sample.
Created attachment 25397 [details]
Sample solution demonstrating the problem
1. Build and run UWP project
2. Tap or click any contact in the grouped listview
3. Watch the debug output for duplicate events
Thank you for the reproduction.
*** Bug 60748 has been marked as a duplicate of this bug. ***
I am seeing ItemTapped being fired twice on UWP as a result of a mouse click, even if the ListView's IsGroupingEnabled = false
Should I raise this as a separate bug, or can it be handled under the auspices of this one?
We just updated our solution to use the latest Xamarin Forms build 126.96.36.199934, only to discover that this bug has now gotten even worse! :(
Before 2.5, we were able to workaround the bug by "throttling" the ItemTapped/ItemSelected events and only accepting events if no additional event was received within .2 seconds. Thereby we could assume that the last event fired did actually represent the item that had been selected in the ListView.
After upgrading to 2.5, we no longer get *any* event representing the item that was selected. We now only get one event, which is kind of an improvement, but the event still fires for what seems to be a random item in the list - not the one that was selected/tapped.
This is really disappointing. The bug makes the ListView totally useless in UWP. I get that Windows Universal is probably not the most widely targeted platform by Xamarin Forms apps, but not prioritizing to fix a bug like this for sure doesn't improve on that.
Indeed really disappointing and frustrating as our entire app is using grouped listviews. Its 2018 and we cant have a working ItemSelected event (UWP)... I mean, really?
I am also having problems with grouped items selecting using UWP older version of the build environment & XF 23.x was fine but anything beyond this is broken (using the current Xamarin beta).
Please see video. 1st is Android 2nd is UWP.
ETA for a fix plz? PS - What is the master case for this?