[Android and iOS] Keyboard is not dismissed after entering text and tapping Search button in MAUI "SearchBar" control
See original GitHub issueDescription
The keyboard doesn’t get dismissed after we have entered the text in SearchBar control we tap/press the “Search/Enter” button on the keyboard. This happens for both Android and iOS.
The dismiss of keyboard used to work in Xamarin Forms.
Expectation: It is expected that the softkeyboard associated with SearchBar control must get closed after user taps on “Search” button on the keyboard.
Steps to Reproduce
-
Download solution here:
-
Run the solution for Android / iOS.
-
On MainPageTap into the SearchBar control, type some text and tap “Search/Enter”.
-
The keyboard does not disappear, it remains visible until the back button is pressed on Android / navigate to some other view in iOS - This is Not OK.
Link to public reproduction project repository
https://github.com/muffadal53/MAUISearchBarKeyboardBug
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
Android 12, iOS 16
Did you find any workaround?
No.
Relevant log output
N/A.
Issue Analytics
- State:
- Created 6 months ago
- Comments:13 (2 by maintainers)
Well, if it works on Forms and it doesn’t on MAUI, then it’s a bug. Just wanted to make sure, that’s all.
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Can repro on android and iOS platform with sample project. MAUISearch.zip