Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 42534 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
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 16652 [details]
When using a custom Entry renderer for Entry controls inside a ListView, setting SetSelectAllOnFocus(true) does not work for some of the Entry controls.
It works fine for the Entry controls that are rendered when the initial ListView cells are rendered. It's the new cells that get rendered when the list is scrolled that experience the issue. Oddly though, it only happens the first time they are selected. If the Entry is selected again, then it works.
I noticed that the Entries that were having the issue did not have a null e.OldElement. I looked at the Forms source and noticed: https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.Android/Renderers/EntryRenderer.cs#L58
Calling the following seems to fix the issue:
if(e.OldElement != null)
### Steps to Reproduce
1. Run the attached project
2. Press on one of the initial Entries
3. Scroll the List and press on the Entry of a newer cells
### Expected Results
Pressing Entry will highlight all the text inside the control.
### Actual Results
Pressing one of the initial Entries selects all its text. However, in the newer Entries, it will not select any text and just show the cursor.
### Testing Info
Tested using Forms 184.108.40.206 and 220.127.116.11-pre2
I noticed that SetSelectAllOnFocus(true) does not work at all in AdjustResize.
Ported issue to GitHub: