Bug 27412 - Keyboard remains visible on Android after setting Focus to an entry and then leaving the app using Home button
Summary: Keyboard remains visible on Android after setting Focus to an entry and then ...
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.4
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Rui Marinho
URL:
Depends on:
Blocks:
 
Reported: 2015-02-25 10:00 UTC by Michiel van Vlaardingen
Modified: 2015-07-16 10:28 UTC (History)
7 users (show)

Tags: android functional keyboard entry AC
Is this bug a regression?: ---
Last known good build:


Attachments
Test sample. (4.71 MB, application/zip)
2015-02-26 05:57 UTC, Rajneesh Kumar
Details
Modified Sample To reproduce (4.65 MB, application/zip)
2015-03-04 09:45 UTC, Rajneesh Kumar
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:
VERIFIED FIXED

Description Michiel van Vlaardingen 2015-02-25 10:00:22 UTC
If I set focus to an Editor on Android,  the keyboard shows up nicely.  However, if I then (with the Editor still focussed and the keyboard showing) use the Home button on my phone,  I move to the phone home screen, but the keyboard remains visible.
Comment 1 Rajneesh Kumar 2015-02-26 05:57:55 UTC
Created attachment 10048 [details]
Test sample.

I tried to reproduce this issue but not able to reproduce this. To reproduce this issue I have followed the steps mention below:

1. Open attached test sample in XS.
2. Set android as startup project and deploy it on emulator/device.
3. It will deploy successfully, click on TextBox.
4. Observed that keyboard will appear.
5. Press home button, observed that keyboard does't remains visible.

Screencast: http://www.screencast.com/t/G4wv2uIX1eZw

Could you please provide a small sample to reproduce this issue? Or please let me know that what steps I am missing to reproduce this issue. Also please attach your full environment info, Nadroid logs and Ide Logs. That would be very helpful to reproduce this issue at our end.

You can get Ide Logs here:
Help=>Open log directory=>Ide_Logs(Choose Latest timestamp)
You can get Environment info here:
Xamarin Studio=>About Xamarin studio=>Show details=>Copy Information.
You can get android logs Here:
View=>Pads=>Android Logs=>(Choose android device to see logs.)

Application Output: https://gist.github.com/Rajneesh360Logica/1d98c0908ab638a73cfc
Build Output: https://gist.github.com/Rajneesh360Logica/fa5b143a4587ced989a2
Device logs(XAP): https://gist.github.com/Rajneesh360Logica/cc09256606a58d9fa628
Ide Logs: https://gist.github.com/Rajneesh360Logica/f7b9a3cbdbc504073575

Environment Info:

Xamarin.Forms Version: 1.3.5.6333-pre1
=== Xamarin Studio ===

Version 5.7.2 (build 7)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.12.0 ((detached/b8f5055)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000077

=== Apple Developer Tools ===

Xcode 6.1 (6604)
Build 6A1052d

=== Xamarin.iOS ===

Version: 8.6.2.22 (Business Edition)
Hash: 862702c
Branch: 
Build date: 2015-02-18 15:19:23-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.Mac ===

Version: 1.13.1.280 (Business Edition)

=== Build Information ===

Release ID: 507020007
Git revision: dcf3f486177d3e625349b51a8f3be807e3fa7712
Build date: 2015-02-24 09:14:27-05
Xamarin addins: ea7c65bb7876e4a876ab365208e94acdf8f330ef

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 2 Michiel van Vlaardingen 2015-02-26 06:28:38 UTC
Small augmentation to your test case:

			var TextBox = new Entry ();

			TextBox.Keyboard = Keyboard.Default;

			var button = new Button{ Text="Set Entry Focus"};
			button.Command = new Command (() => {
				TextBox.Focus();
			});


			Content = new StackLayout { 
				Spacing = 10,
				VerticalOptions = LayoutOptions.Center,
				Children = { TextBox,button }
			};


Important part, that may not have been clear from the description is that the Focus needs to be set programatically.  So with the above code, reproduce by tapping 'Set Entry Focus' and then the device home button.  (Android 4.1.2, Samsung S2)



=== Xamarin Studio ===

Version 5.7.1 (build 17)
Installation UUID: e229e441-c127-4821-bb30-88f119fee7da
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.Mac ===

Not Installed

=== Xamarin.iOS ===

Version: 8.6.1.26 (Indie Edition)
Hash: 98ee412
Branch: 
Build date: 2015-02-11 04:37:05-0500

=== Xamarin.Android ===

Version: 4.20.0.28 (Indie Edition)
Android SDK: /Users/michiel/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

=== Build Information ===

Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

=== Operating System ===

Mac OS X 10.9.5
Darwin Michiel-Van-Vlaardingens-MacBook-Air.local 13.4.0 Darwin Kernel Version 13.4.0
    Wed Dec 17 19:05:52 PST 2014
    root:xnu-2422.115.10~1/RELEASE_X86_64 x86_64


IDE log: https://gist.github.com/networkapp/8d36ab44949dac0a9edf
Unable to get Android logs (dialog disappears before I am able to select my device)
Comment 3 Rajneesh Kumar 2015-03-04 09:45:30 UTC
Created attachment 10149 [details]
Modified Sample To reproduce

@ Michiel, Thanks a lot for clarification of issue and providing the code to reproduce this issue.

I have checked this issue again, and able to reproduce this, to reproduce this issue I have used the code provided in comment 2. I have attached modified sample to reproduce this issue.

Steps To reproduce:

1. Open attached test sample in XS.
2. Set android as startup project and deploy it on emulator.
3. It will deploy successfully, click on button "Set Entry Focus".
4. Observed that keyboard will appear.
5. Press home button, observed that keyboard remains visible.

Screencast: http://www.screencast.com/t/1cvAWX66M

Xamarin Forms: 1.4.0.6336-pre1

Device log(XAP): https://gist.github.com/Rajneesh360Logica/17a6c96d11fb63672d03
Ide Logs: https://gist.github.com/Rajneesh360Logica/d7ec2540be52a4dd5760
Environment Info: https://gist.github.com/Rajneesh360Logica/e3b94c5aa8dda138e641
Comment 4 Rajneesh Kumar 2015-03-04 09:48:54 UTC
Setting its status 'NEEDINFO' to 'CONFIRMED'.
Comment 5 Stephane Delcroix 2015-06-25 07:40:08 UTC
this will be fixed in 1.4.4
Comment 6 Parmendra Kumar 2015-07-16 10:28:09 UTC
I have checked this issue with X.F 1.4.4-pre1 and its working fine at my end.
To verify this issue I have used sample project attached in comment #3.


Hence closing this issue.