Bug 31333 - [Android] Focus() on Entry in ViewCell brings up keyboard, but doesn't have cursor in EditText
Summary: [Android] Focus() on Entry in ViewCell brings up keyboard, but doesn't have c...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.3
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: E.Z. Hart [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-06-23 18:32 UTC by Michael
Modified: 2015-11-16 16:38 UTC (History)
5 users (show)

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

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 Michael 2015-06-23 18:32:21 UTC
When a entry is nested in a ViewCell, calling Focus() on the entry will only bring up the keyboard on Android. The cursor is not be placed in the Entry and typing on the keyboard does not register any text in the Entry.

I verified this with both Xamarin.Forms 1.4.2 and 1.4.3 pre-3. Attached reproduction case currently has 1.4.3 pre-3 dlls referenced in the project due to bug https://bugzilla.xamarin.com/show_bug.cgi?id=26205.

Steps to reproduce:
1. Download and open project.
https://www.dropbox.com/s/rltz3k9quzf0w6w/FocusThroughList.zip?dl=0
2. Run project on Android
3. Click on "Focus" button at the top of the page

Expected Results:
Entry Keyboard should be displayed
Entry should have cursor displayed giving visual queue the user can enter text
User can enter text in Entry by using the Keyboard

Observed Results:
Entry Keyboard is displayed
Entry does not have cursor displayed
User cannot enter text in Entry by using the Keyboard

I also tested various Custom Renderers utilizing "Control.Focusable = False" to see if the focus was being stolen by any other visual elements. This did not work. I left the custom renderers in the project with the ExportRenderer lines commented out. You can view this in CustomRenderers.cs

*********Environment*******
Xamarin Studio
Version 5.9.4 (build 5)
Installation UUID: 79a7cdf3-cf91-4206-8668-4654a92d0c83
Runtime:
	Mono 4.0.2 ((detached/198235d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020004

Apple Developer Tools
Xcode 6.3 (7569)
Build 6D570

Xamarin.iOS
Version: 8.10.2.17 (Business Edition)
Hash: 03fdc45
Branch: master
Build date: 2015-06-09 07:44:00-0400

Xamarin.Android
Version: 5.1.4.8 (Business Edition)
Android SDK: /Users/michaelwatson/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		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_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

Xamarin Android Player
Version: Unknown version
Location: /Applications/Xamarin Android Player.app

Xamarin.Mac
Version: 2.0.2.17 (Business Edition)

Build Information
Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

Operating System
Mac OS X 10.10.2
Darwin Michaels-MacBook-Pro-2.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Feb 26 19:26:47 PST 2015
    root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
Comment 1 Rajneesh Kumar 2015-06-30 10:21:59 UTC
I have checked this issue and able to reproduce this. To reproduce this issue I have followed the steps and instruction provided in bug description.

Screencast: http://www.screencast.com/t/41AnEfjr9jxv

I observed that clicking on "Focus" button Entry Keyboard is displayed and Entry does not have cursor displayed, and user cannot enter text in Entry by using the Keyboard.

Application Output: https://gist.github.com/Rajneesh360Logica/13f2b2d90cb6922aa8c7
Build Output: https://gist.github.com/Rajneesh360Logica/d106ab5d26b98e1007e6
Ide logs: https://gist.github.com/Rajneesh360Logica/7b574bac305c65c5d8b3

Environment Info:
XF 1.4.3.6364-pre3
=== Xamarin Studio ===

Version 5.9.4 (build 5)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

=== Xamarin.Android ===

Version: 5.1.4.16 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		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 Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 8.10.2.39 (Business Edition)
Hash: 4e8928a
Branch: master
Build date: 2015-06-29 11:03:42-0400

=== Xamarin.Mac ===

Version: 2.0.2.39 (Business Edition)

=== Build Information ===

Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

=== 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 E.Z. Hart [MSFT] 2015-11-16 16:38:16 UTC
Should be fixed in 1.5.2-pre3