Skip to content

bug: Keyboard not dismissing on enter press in searchbar #31156

@HappyKnuckles

Description

@HappyKnuckles

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

Pressing Enter in ion-searchbar leaves the input focused and the on-screen keyboard visible.

Expected Behavior

Pressing Enter should blur the searchbar and dismiss the keyboard, matching the convention used by WhatsApp, Proton Mail, and iOS Settings and by native iOS/Android search fields generally.

Steps to Reproduce

  1. Go to the code reproduction URL (ionic docs) on a mobile device.
  2. Type anything in and press the enter/search button.

Code Reproduction URL

https://stackblitz.com/run?file=src%2Fapp%2Fexample.component.ts

Ionic Info

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions