Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
When putting a ion-input inside of an ion-item, the click event on the ion-item is emitted two times when clicking just above or below the ion-input.
Expected Behavior
The click event should be emitted just once.
Steps to Reproduce
- Paste the following code in a page:
<ion-item (click)="onClick()">
<ion-input value="Hello world!">
</ion-input>
</ion-item>
onClick() {
console.log("Item clicked")
}
- Click just above or below the ion-input.
- See the double log of "Item clicked".
Code Reproduction URL
https://github.com/JulienLecoq/bug_ion-item_click_with_ion-input
Ionic Info
Ionic:
Ionic CLI : 7.2.0 (/Users/julien_lecoq/.nvm/versions/node/v20.14.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.2.6
@angular-devkit/build-angular : 18.1.4
@angular-devkit/schematics : 18.1.4
@angular/cli : 18.1.4
@ionic/angular-toolkit : 11.0.1
Capacitor:
Capacitor CLI : 6.1.2
@capacitor/android : not installed
@capacitor/core : 6.1.2
@capacitor/ios : not installed
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v20.14.0 (/Users/julien_lecoq/.nvm/versions/node/v20.14.0/bin/node)
npm : 10.7.0
OS : macOS Unknown
Additional Information
No response