Bug 59006 - Focusing any Entry control inside TableView always binds to first Entry
Summary: Focusing any Entry control inside TableView always binds to first Entry
Status: NEEDINFO
Alias: None
Product: Forms
Classification: Xamarin
Component: Android (show other bugs)
Version: 2.4.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 60361 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-24 11:44 UTC by Jouni Suominen
Modified: 2018-02-02 11:33 UTC (History)
5 users (show)

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


Attachments
Slightly modified Xamarin.Forms template project (121.86 KB, application/zip)
2017-08-24 11:44 UTC, Jouni Suominen
Details
Additional Reproduction (1.54 MB, application/x-zip-compressed)
2017-10-04 18:38 UTC, williamd
Details
Screen Capture of Issue (2.72 MB, video/mp4)
2017-10-04 18:39 UTC, williamd
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 for Bug 59006 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEEDINFO

Description Jouni Suominen 2017-08-24 11:44:11 UTC
Created attachment 24395 [details]
Slightly modified Xamarin.Forms template project

If there are for example two Entry cells inside a TableView, entering text to the first one works as expected. But if you then focus the second Entry and try to enter text to it, the text is entered to the first Entry on Android API >= 24.

Steps to reproduce:
1. Install the attached project (it's the basic Xamarin.Forms template project with modified NewItemPage.xaml)
2. Launch the EntryTest.Droid project on for example Nexus_5X_API_24_x86 (API 24) emulator.
3. Press ADD in the upper right corner.
4. Edit the "Item name" field.
5. Edit the "This is an item description" field.

Actual result: in step 5 text goes to "Item name" field.

Versions:
Visual Studio for Mac Community 7.1 (build 1297).
Xamarin Forms 2.4.0.266-pre1
Android API 24
This issue does not seem to happen on API version < 24.
Comment 1 Paul DiPietro [MSFT] 2017-08-24 23:13:42 UTC
For some reasons I seem unable to reproduce this on a Galaxy S8 device which is on 7.0, nor on an API 25 emulator. Entering text into the second field as mentioned saves it accordingly (e.g. the first field being set to "one" and the second to "two" appears to work as expected) Can you confirm that the version on the reproduction is what you're using, or if anything different is possibly causing the behavior?
Comment 2 Jouni Suominen 2017-08-25 07:17:17 UTC
That's weird. One of my users reported this issue and his running Android 7.0 on HTC One X (HTC Model 10). I'm also able to reproduce this on the Nexus_5X_API_24_x86 emulator that ships with Android SDK (afaik). Would you like a screen cap video of the issue?
Comment 3 Paul DiPietro [MSFT] 2017-08-25 16:04:53 UTC
It wouldn't hurt for visual confirmation. Also, any other specific emulator configurations or devices that exhibit the behavior are good to know about as well.
Comment 4 williamd 2017-10-04 18:38:40 UTC
Created attachment 25110 [details]
Additional Reproduction

This project reproduces the issue.
Comment 5 williamd 2017-10-04 18:39:48 UTC
Created attachment 25111 [details]
Screen Capture of Issue

This example shows the bug in action on a physical Motorola Moto G4 device running Android 7.0
Comment 6 williamd 2017-10-04 18:45:33 UTC
We have a customer that primarily uses the Moto G4 and this issue is a huge blocker for us. Please see our minimum reproduction and example video above. Let me know if there is any other information I can provide.
Comment 7 Paul DiPietro [MSFT] 2017-10-25 17:21:26 UTC
*** Bug 60361 has been marked as a duplicate of this bug. ***
Comment 8 Paul Anderson 2017-11-10 04:07:56 UTC
Hi All,

We are getting the same issue in Moto G 4 Plus device. Also we get the same issue on other Android device also which has been mentioned in the following bugzilla id https://bugzilla.xamarin.com/show_bug.cgi?id=60361 

Please let us know whether you can replicate this.

Regards,
Paul Anderson.
Comment 9 Paul Anderson 2017-11-10 04:08:33 UTC
Hi All,

We are getting the same issue in Moto G 4 Plus device. Also we get the same issue on other Android device also which has been mentioned in the following bugzilla id https://bugzilla.xamarin.com/show_bug.cgi?id=60361 

Please let us know whether you can replicate this.

Regards,
Paul Anderson.
Comment 10 Paul Anderson 2018-01-02 08:44:58 UTC
Hi All,

Any update on this issue?

Regards,
Paul Anderson.
Comment 11 Alex 2018-02-02 11:33:39 UTC
Your problem seems the same of that bug --> https://bugzilla.xamarin.com/show_bug.cgi?id=35058#c2

Android pass trought many Layout cycles that messed up evrything... i'm trying to find a final solution too... If your problem is only the focus i think you can create a custom renderer for your entry like the code below (ExtendedEntry is my custom entry):
        protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
        {
            base.OnElementChanged(e);
            ExtendedEntry baseEntry = Element as ExtendedEntry;
            if (e.OldElement == null)
                baseEntry.Focus();
        }