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 52828 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 19994 [details]
cancel button missing when text in searchbar is empty
When Text in the SearchBar is empty, the Cancel button is not visible. Only when Text is non-empty the Cancel button is displayed.
So you can't dismiss the keyboard when Text is empty. I think the Cancel button should always be visible when the SearchBar has focus.
It appears that this is occurring due to how renderer code is structured; the ShowsCancelButton value is based on whether the text entered is null or empty, but I think that it might be possible to add a platform specific feature which would allow the Cancel Button to be shown all the time or not at all, which would appear to reflect how it works in the interface builder/native app.
This would constitute a breaking change to some extent, but might be first worth a proposal in the evolution forum (https://forums.xamarin.com/categories/xamarin-forms-evolution). I'm going to mark this as an enhancement for the time being.
Do we know when this will be fixed? Any timelines?
I believe this is a bug more than an enhancement, it prevents the users from dismissing the keyboard when the text is empty. The default behavior for the iOS UISearchbar's ShowsCancelButton property is to display the cancel button as long as the searchbar is highlighted/focused (even if text is empty) and I think the Forms SearchBar should behave the same on iOS
I found a thread in the forums