Bug 32600 - [Android] Changing Placeholder or Text property of Entry/Editor in the Focused event closes the keyboard
Summary: [Android] Changing Placeholder or Text property of Entry/Editor in the Focuse...
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.4.4
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 59550 ()
Depends on:
Blocks:
 
Reported: 2015-07-30 04:05 UTC by Joseph Redfern
Modified: 2017-09-18 13:39 UTC (History)
12 users (show)

Tags: ac, editor, focus, keyboard, retest
Is this bug a regression?: ---
Last known good build:


Attachments
Repros on Android. iOS works. (177.53 KB, application/zip)
2015-07-31 13:27 UTC, Chris King
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 32600 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:
CONFIRMED

Description Joseph Redfern 2015-07-30 04:05:03 UTC
I'm trying to work around the lack of a Placeholder property on the Editor view, and have done something similar to:

>    var placeholderText = "Blank Entry";
>
>    var textEditor = new Editor { Text = placeholderText };
>
>    textEditor.Focused += (obj, ev) => {
>        textEditor.Text = String.Empty;
>    }
>
>    textEditor.Unfocused += (obj, ev) => {
>        if(String.IsNullOrWhiteSpace(textEditor.Text)){
>            textEditor.Text = placeholderText;
>        }
>    }

This *almost* works, however, when initially focusing the editor (by tapping), the keyboard does not appear - a blinking cursor is displayed, and a second tap in the editor brings up the keyboard.

Can you confirm that this is not the expected behavior, and that the keyboard should be displayed after the first tap?

I'm using the latest release of Xamarin Forms (1.4.4.6392) and an Asus Transformer Tab running Android 4.4.2.

Thank you.
Comment 1 Chris King 2015-07-31 13:27:26 UTC
Created attachment 12319 [details]
Repros on Android. iOS works.
Comment 2 Sunny Milenov 2016-09-27 18:56:43 UTC
I wish e had found this before we fought this battle :(

Still present in 2.0.5782
Comment 3 adrianknight89 2016-10-06 08:10:46 UTC
The battle continues. :)

https://github.com/xamarin/Xamarin.Forms/pull/424
Comment 4 adrianknight89 2016-10-12 00:26:09 UTC
I think the solution is to use AdjustResize as soft input method. I just came across another issue. If you set focus in OnAppearing of your page, the keyboard won't show in AdjustPan.

AdjustResize should fix both cases.
Comment 5 David Ortinau [MSFT] 2017-08-30 15:58:11 UTC
Confirmed bad in 2.4.0.269-pre2. Takes 2 taps to get the keyboard to appear.
Comment 6 arorasurbhi93 2017-09-18 10:31:53 UTC
Still the same issue. Anybody knows how to fix?
Comment 7 Paul DiPietro [MSFT] 2017-09-18 13:39:03 UTC
*** Bug 59550 has been marked as a duplicate of this bug. ***