Bug 42074 - TimePicker doesn't lose focus on Cancel
Summary: TimePicker doesn't lose focus on Cancel
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-06-22 12:55 UTC by Arne De Vreese
Modified: 2016-10-21 16:29 UTC (History)
3 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:


Attachments
Test Project (186.40 KB, application/x-zip-compressed)
2016-10-21 14:44 UTC, Arne De Vreese
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 FIXED

Description Arne De Vreese 2016-06-22 12:55:54 UTC
To reproduce: add a TimePicker and subscribe to the Focused and Unfocused events.

Focus and select 'OK' will trigger the events.
Focus and select 'Cancel' will trigger the Focused event but not the Unfocsed event.
On the next focus the 'Focused' event will not be triggered since the TimePicker is still focussed (IsFocussed == true).

This bug seems to be the same issue as in bug 41424. However in 2.3.1-pre1 the DatePicker issue is fixed, but the TimePicker issue is not.
Comment 1 Rui Marinho 2016-07-12 15:07:05 UTC
Should be fixed in 2.3.2
Comment 2 Arne De Vreese 2016-10-21 14:43:36 UTC
The behavior seems to be back on both TimePicker and DatePicker.

## Steps to reproduce

1. Launch the attached test project to an Android device or simulator.

2. Focus the DatePicker. This will trigger the PropertyChanging, PropertyChanged, and Focused events, thus adding 3 labels to the StackLayout.

3. Select 'OK'. This will trigger the PropertyChanging, PropertyChanged, and UnFocused events, thus adding 3 more labels to the StackLayout.

4. Hit the 'Clear list' button to remove all labels from the StackLayout.

5. Focus the DatePicker again. This will again result in 3 labels being added to the StackLayout.

6. Select 'Cancel'

Expected result: the PropertyChanging, PropertyChanged, and UnFocused events should be triggered, resulting in 3 extra labels in the StackLayout.

Actual result: the events aren't triggered, nor are the labels added to the StackLayout.

7. Hit the 'Clear list' button to remove all labels from the StackLayout.

8. Focus the DatePicker once again.

Expected result: the PropertyChanging, PropertyChanged, and Focused events should be triggered, resulting in 3 labels in the StackLayout.

Actual result: the events aren't triggered, no labels are added to the StackLayout.

9. Repeat these steps for the TimePicker

Both the expected and actual results are the same as above.


## Notes

Issue occures in XF 2.2.0.45, 2.3.2.127 and 2.3.3.163-pre.
Comment 3 Arne De Vreese 2016-10-21 14:44:03 UTC
Created attachment 18160 [details]
Test Project
Comment 4 Arne De Vreese 2016-10-21 14:45:40 UTC
## Environment

Microsoft Visual Studio Professional 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Professional

Visual Basic 2015   00325-60003-09354-AA045
Microsoft Visual Basic 2015

Visual C# 2015   00325-60003-09354-AA045
Microsoft Visual C# 2015

Visual C++ 2015   00325-60003-09354-AA045
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00325-60003-09354-AA045
Windows Phone SDK 8.0 - ENU


SharpSvn is linked to: Apr 1.5.1, Apr-util 1.5.4, Cyrus Sasl 2.1.25, eXpat 2.1.0, OpenSSL 1.0.2d 9 Jul 2015, serf 1.3.8, SQLite 3.7.17, Subversion 1.8.13-SharpSvn-1.8.13, ZLib 1.2.8
SharpSvn is optionally linked to: Berkeley DB 4.4.20, SharpPlink 0.64.0(SharpSvn)

Application Insights Tools for Visual Studio Package   7.0.20622.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11107.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Command Bus, Event Stream and Async Manager   Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

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

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.4.4
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.

SQL Server Data Tools   14.0.60519.0
Microsoft SQL Server Data Tools

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
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.

Xamarin   4.2.0.703 (3b7df6f)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.1.3 (96c7ba6)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.0.1.10 (ad1cd42)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 5 Paul DiPietro [MSFT] 2016-10-21 16:29:10 UTC
I'm unable to reproduce this on an emulator following the provided steps, so without further and more conclusive evidence I'm marking this as fixed once again. I would strongly suggest a clean and rebuild of the project if you haven't to make certain that some cached version is not being used.