Bug 57520 - Keyboard shown even after the visibility of Entry is set to false
Summary: Keyboard shown even after the visibility of Entry is set to false
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.3
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-06-15 11:30 UTC by Paul Anderson
Modified: 2017-09-28 10:19 UTC (History)
7 users (show)

Tags: ac keyboard entry isvisible
Is this bug a regression?: ---
Last known good build:

Sample (54.86 KB, application/zip)
2017-06-15 11:30 UTC, Paul Anderson

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 57520 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:

Description Paul Anderson 2017-06-15 11:30:01 UTC
Created attachment 22921 [details]

In our application we were collapsing the visibility of Xamarin.Forms Entry for certain scenarios. Entry control is hidden from the application however the keyboard is not hidden. Is this a actual behaviour of the control or bug. Could any one please help me out?

Here I have attached a sample project to replicate the mentioned behaviour. Run the sample and type false in entry and observe the behaviour.
Comment 1 adrianknight89 2017-06-16 16:11:32 UTC
In my opinion, this should be the expected behavior. What if, for some strange reason, I want to show the Entry when I type "false not". So, type "false", it's hidden. Continue adding "not", it shows up again.

If you want to hide the keyboard upon typing false, why don't you call edit.Unfocus()?
Comment 2 Paul Anderson 2017-06-20 08:51:43 UTC
You have mentioned "I want to show the Entry when I type "false not". So, type "false", it's hidden. Continue adding "not", it shows up again."
I have checked this behaviour in Entry control. If I were type "false" the TextChangedEvent has called and the entry would hide. Continuously adding "not", the TextChangedEvent has not called and the entry has not shown again. So only we have asked which one is the correct behaviour.
Comment 3 Jimmy [MSFT] 2017-06-22 18:11:49 UTC
There probably needs to be a discussion about what the behavior should be when the Entry us hidden so I will keep this open as CONFIRMED so we can track this. 

In the meantime, manually calling Unfocus() seems to be the way to go so the keyboard is hidden.
Comment 4 adrianknight89 2017-06-24 12:21:17 UTC

I added the "not" functionality to your code. Did you add another if case to handle that logic? I tested it on my own device and it worked for me.