ionic-team / ionic-team/ionic-framework

bug: stopPropagation is ignored in ion-checkbox

Đang mở
#30,241 0 bình luận 2 reaction 0 người được giao Xem trên GitHub
type: bug
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

### 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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.