Bug 58898 - ListView.ItemSelected firing twice
Summary: ListView.ItemSelected firing twice
Status: RESOLVED DUPLICATE of bug 44886
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.4.0
Hardware: PC Windows
: High critical
Target Milestone: 2.4.0
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-18 23:00 UTC by Jon Goldberger [MSFT]
Modified: 2017-08-19 00:17 UTC (History)
2 users (show)

Tags: ac uwp listview itemselected
Is this bug a regression?: Yes
Last known good build: 2.3.4.267


Attachments
Test Project (1.06 MB, application/zip)
2017-08-18 23:00 UTC, Jon Goldberger [MSFT]
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 DUPLICATE of bug 44886

Description Jon Goldberger [MSFT] 2017-08-18 23:00:57 UTC
Created attachment 24313 [details]
Test Project

## description

ListView.ItemSelected firing twice when running on UWP.

## steps to reproduce

1. Open the attached test project

2. Run the UWP app

3. Select an item in the list

Expected result: Only one new item will be added to the list

Actual result: two new items are added. 

## Notes

Issue does not occur on iOS or Android


## Workaround

Test to see if e.SelectedItem is equal to the last selected item, and if so return without running code in event handler. 

## regression status

This is a regression. 

2.3.4.267      : GOOD
2.3.5.233-pre1 : BAD
2.4.0.266-pre1 : BAD


## environment

Forms Version 2.4.0.266-pre1

Microsoft Visual Studio Enterprise 2017 
Version 15.3.0
VisualStudio.15.Release/15.3.0+26730.3
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Enterprise

Architecture Diagrams and Analysis Tools   00369-60000-00001-AA405
Microsoft Architecture Diagrams and Analysis Tools

Visual Basic 2017   00369-60000-00001-AA405
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA405
Microsoft Visual C# 2017

Visual C++ 2017   00369-60000-00001-AA405
Microsoft Visual C++ 2017

Visual F# 4.1   00369-60000-00001-AA405
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.8.00712.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30726.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Template Engine 2017   15.0.30726.0
ASP.NET Template Engine 2017

ASP.NET Web Frameworks and Tools 2012   4.0.20601.0
For additional information, visit https://www.asp.net/

ASP.NET Web Frameworks and Tools 2017   5.2.50601.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30728.0
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.9000.1
Microsoft Azure Data Lake Tools for Visual Studio

Azure Data Lake Tools for Visual Studio   2.2.9000.1
Microsoft Azure Data Lake Tools for Visual Studio

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

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure HDInsight Azure Node   2.2.9000.1
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service   2.2.9000.1
Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio   1.7
Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service   2.2.9000.1
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node   1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50719.1

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   4.6.8-pre (ec7034f)
Support for debugging Mono processes with Visual Studio.

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

SQL Server Data Tools   15.1.61707.200
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   2.3.4.0
TypeScript tools for Visual Studio

Visual C++ for Cross Platform Mobile Development (Android)   15.0.26724.01
Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Cross Platform Mobile Development (iOS)   15.0.26724.01
Visual C++ for Cross Platform Mobile Development (iOS)

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Universal Windows Apps   15.0.26730.00
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

WebJobs Tools v1.0.0   15.0.30812.0
WebJobs Tools v1.0.0

Xamarin   4.6.0.295 (306f76a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.4.0.19 (0cd0214)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.12.0.14 (bf350ba)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 1 Jimmy [MSFT] 2017-08-18 23:26:06 UTC
I can reproduce this with the attached project and it is a regression in 2.4.0-pre1 carried over from the 2.3.5 pre-releases.
Comment 2 Jon Goldberger [MSFT] 2017-08-19 00:17:34 UTC
This seems to also have been reported in bug 44886, which was fixed, then re-opened as it regressed. Supposedly this should now be fixed in 2.4.1-pre1: https://bugzilla.xamarin.com/show_bug.cgi?id=44886#c14.

I am going to mark this as a duplicate of that bug.

*** This bug has been marked as a duplicate of bug 44886 ***