ionic-team / ionic-team/ionic-framework

bug: stopPropagation is ignored in ion-checkbox

Ouverte
#30,241 0 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
type: bug
Langage dominant
TypeScript
Étoiles
52.7k
Forks
13.3k
Merge moyen
1 j 15 h
PR mergées (30 j)
51

Description

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

Currently in the following setting
```


Description



```
A call to stopPropagation inside the `help()` function will still trigger the whole ion-item + ion-checkbox.

### Expected Behavior

From `stopPropagation` i would expect that it does just that. This is currently not working, therefore the bug.
In the previous setup with the old ion-checkbox where i had an ion-label with the same help() function, this was not a problem, even though the click event was on the ion-item to make sure it behaves as fully clickable as expected on mobile.

This might be related to, but not the same as https://github.com/ionic-team/ionic-framework/issues/20521 which was tagged a design decision. The workaround there does not work for this, i would need to place the help icon outside of the label - either to the beginning or the end of the ion-item which would break my app design and is not what i want. And it did work previously with ion-label instead of the checkbox built-in label.

### Steps to Reproduce

See the description above. Run the code in the github repo given.
Then click on the question mark. You will see the checkbox being checked. It should not be doing that, due to the stopPropagation() in the code.

### Code Reproduction URL

https://github.com/pkunszt/ionic-checkbox-issue

### Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/opt/homebrew/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.4.3
@angular-devkit/build-angular : 19.2.1
@angular-devkit/schematics : 19.2.1
@angular/cli : 19.2.1
@ionic/angular-toolkit : 12.1.1

Utility:

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

System:

NodeJS : v23.9.0 (/opt/homebrew/Cellar/node/23.9.0/bin/node)
npm : 10.9.2
OS : macOS Sequoia 15.1.1 (added manually as this was undefined in the run)

### Additional Information

_No response_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.