Bug 32842 - [UWP] ItemSelected Not Ignored When a ListView Item Contains a TapGestureRecognizer
Summary: [UWP] ItemSelected Not Ignored When a ListView Item Contains a TapGestureReco...
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.5
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: E.Z. Hart [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-08-06 18:51 UTC by Jimmy [MSFT]
Modified: 2018-02-28 22:33 UTC (History)
8 users (show)

Tags: itemselected, tap recognizer, listview, ac, uwp, gestures
Is this bug a regression?: ---
Last known good build:


Attachments
Repro project (331.64 KB, application/zip)
2015-08-06 18:51 UTC, Jimmy [MSFT]
Details
Updated repro (343.25 KB, application/x-zip-compressed)
2017-06-16 19:55 UTC, Paul DiPietro [MSFT]
Details
UWPInaccessibleListViewIssue (1.14 MB, application/x-zip-compressed)
2017-11-23 19:23 UTC, Christian Schwarz
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Jimmy [MSFT] 2015-08-06 18:51:09 UTC
Created attachment 12395 [details]
Repro project

*** Overview ***
On WinRT, if an item in a ListView contains a TapGestureRecognizer, the ListView’s ItemSelected event is not ignored is still fired along with the TapGestureRecognizer event.

I reproduced the issue on Forms 1.4 and 1.5-pre1

*** Steps to Reproduce ***
1. Run the WinPhone 8.1 project
2. Press the teal box item


*** Actual Results ***
Selecting the box item will display the alert and also navigate to a different page because both events are fired instead of just the TapGestureRecognizer.


*** Expected Results ***
The ListView’s ItemSelected event is ignored when the teal box is pressed and only the TapGestureRecognizer event is fired.


*** Environment Info ***
Microsoft Visual Studio Professional 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

Team Explorer for Visual Studio 2013   06177-004-0444002-02323
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0444002-02323
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0444002-02323
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0444002-02323
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0444002-02323
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0444002-02323
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0444002-02323
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

Common Azure Tools   1.4
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Advertising SDK for Windows Phone   
Microsoft Advertising SDK for Windows Phone
Build 

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Multilingual App Toolkit   3.1.1250.0
Multilingual App Toolkit helps you localize your Windows Store app by providing file management, pseudo and machine translation, translation editor, and build integration. http://go.microsoft.com/fwlink?linkid=245767

NuGet Package Manager   2.8.60610.756
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Xamarin   3.11.666.0 (ebae43a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.4.16 (5f55a9ef61c11b6ce0890bc91e4c71b1b92be214)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.

Xamarin.iOS   8.10.2.0 (67b390d0d1bd741582cf7b7fd3ffea08583a3f83)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration
Comment 1 Paul DiPietro [MSFT] 2015-08-19 11:44:59 UTC
I and another person have tried to verify this and can't seem to reproduce the issue as described. That isn't to say that this isn't occurring in certain circumstances but more info will be needed. Is this in an emulator or on a physical device?
Comment 2 Mobiledev 2015-08-19 11:47:10 UTC
I have reproduced on both, does the included repro project not demonstrate the issue?
Comment 3 Paul DiPietro [MSFT] 2015-08-19 11:49:20 UTC
It did not. Tapping the teal box only showed the alert and did not navigate to a new page which was consistent with the expected results.
Comment 4 Jimmy [MSFT] 2015-08-19 13:22:50 UTC
I downloaded and ran the attached project and was still able to reproduce the issue on a Nokia 925 device.

Note that the issue is present in the Windows Phone 8.1 RT project, _not_ in the WP 8.0 project that is the template default, though both are included in the attached repro for comparison.
Comment 5 Mobiledev 2015-08-19 13:27:31 UTC
I also tested this on a Nokia 930 device running 8.1 with the same issue.
Comment 6 Paul DiPietro [MSFT] 2015-08-19 17:28:11 UTC
Thanks for pointing out the default issue. Updating.
Comment 7 Paul DiPietro [MSFT] 2017-06-16 19:54:49 UTC
Still appears to be an issue as of the latest 2.3.6. Setting back to confirmed for upkeep and attaching an updated repro since the old one doesn't play nicely due to the 8.1 project (UWP still has the issue).
Comment 8 Paul DiPietro [MSFT] 2017-06-16 19:55:05 UTC
Created attachment 22957 [details]
Updated repro
Comment 9 Christian Schwarz 2017-11-23 19:23:12 UTC
Created attachment 25820 [details]
UWPInaccessibleListViewIssue

I'm having the same issue since Xamarin.Forms 2.4.

Even when setting the newly introduced ListViewSelectionMode.Inaccessible.

https://github.com/xamarin/Xamarin.Forms/pull/1157

Working: 2.3.4
Broken: 2.4, 2.5
Comment 10 Christian Schwarz 2017-11-29 21:05:41 UTC
Looks like the following PR introduced the change:

https://github.com/xamarin/Xamarin.Forms/pull/842
Comment 11 Samantha Houts [MSFT] 2018-02-12 18:28:56 UTC
This has been migrated to https://github.com/xamarin/Xamarin.Forms/issues/1406. Please follow that issue for updates. Thanks!