Skip to content

[Android and iOS] Keyboard is not dismissed after entering text and tapping Search button in MAUI "SearchBar" control #14061

@muffadal53

Description

@muffadal53

Description

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.

Record_2023-03-20-15-28-58.mp4

Steps to Reproduce

  1. Download solution here:

    https://github.com/muffadal53/MAUISearchBarKeyboardBug

  2. Run the solution for Android / iOS.

  3. On MainPageTap into the SearchBar control, type some text and tap "Search/Enter".

  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions