Skip to content

bug: click event not fired on slotted buttons inside an ion-input that has focus #28762

@chadweimer

Description

@chadweimer

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

When using ion-button elements in the "end" slot of an ion-input, the buttons do not fire the click event when clicked while the ion-input has focus.

Expected Behavior

The click event should fire whether the input control has focus or not.

Steps to Reproduce

  1. Add an ion-input like the following
    <ion-item> <ion-input label="Input with buttons"> <ion-button slot="end" onClick={...} >Click Me</ion-button> </ion-input> </ion-item>
  2. Click the button when the input control does not have focus - onClick fires
  3. Click the button when the input control has focus - onClick does not fire

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 5.4.16

Utility:

cordova-res : not installed
native-run : not installed

System:

NodeJS : v20.10.0
npm : 10.2.3
OS : Linux 6.1

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions