Bug 52299 - On Android, using a physical keyboard, setting Focus from an Entry's Completed handler fails
Summary: On Android, using a physical keyboard, setting Focus from an Entry's Complete...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.4
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-02-03 19:12 UTC by John Hardman
Modified: 2017-11-08 12:47 UTC (History)
7 users (show)

Tags: Android physical keyboard focus entry Completed handler ac fr
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:

Description John Hardman 2017-02-03 19:12:18 UTC
As per the discussion at 

using Xamarin.Forms, running on Android, using a physical keyboard, if the Completed handler of one Entry sets the focus to another Entry, that focus setting does not work (it seems the focus ends up on the control after the second Entry).

Note that if a delay is introduced before attempting to set the focus, then it works but introduces a race condition (so only works so much of the time).

This delay is not necessary on other platforms (e.g. UWP), nor on Android devices using a soft keyboard rather than a physical keyboard. Using a delay is not a solution as the race condition makes it unreliable, and increasing the delay to make it less unreliable makes the app sluggish.
Comment 1 Giusepe Casagrande 2017-02-22 19:13:32 UTC
I can confirm this bug, having the same issue here.
If needed, I can provide a sample project demonstrating it.
Comment 2 Samantha Houts [MSFT] 2017-02-23 18:43:58 UTC
@Giusepe Casagrande: Please do! Thank you!
Comment 3 Giusepe Casagrande 2017-02-24 23:41:48 UTC
@Samantha Houts Here it is: https://github.com/GiusepeCasagrande/ScrollLoginBug/tree/FormsWay

If you run it on iOS it will work as expected, but on Android it will go crazy and "skip the fields"
Comment 4 Samantha Houts [MSFT] 2017-04-18 23:32:50 UTC
Returning to NEW status for further investigation
Comment 5 Paul DiPietro [MSFT] 2017-04-20 19:20:41 UTC
The reproduction looks to show the issue against 2.3.5 as well; pressing enter when inside the first field will cause it to jump to the last. Setting to confirmed until this can be further investigated.
Comment 6 Samantha Houts [MSFT] 2017-09-11 20:25:52 UTC
Comment 7 Rui Marinho 2017-11-08 12:47:55 UTC
Should be fixed on 2.5.1-pre1