Skip to content

bug: ion-checkbox don't let interact with label #29304

Closed as not planned
Closed as not planned
@JEricaM

Description

@JEricaM

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

Adding a link inside the checkbox label should let the user open the link.

Expected Behavior

A link/click inside a label in checkbox should work correctly.

Steps to Reproduce

Add a ion.checkbox like that

<ion-checkbox
                                        value={value}
                                        name='name'
                                        onIonChange={(e) => this.handleChangeCheck(e)}
                                        label-placement="end">
                                        <div class="ion-text-wrap">My text <a href="https://google.it"> click here</a></div>
                                    </ion-checkbox>

If I click on the link part of the label the href don't triggers, instead only works onIonChange.

Code Reproduction URL

https://d6xspp.stackblitz.io

Ionic Info

Ionic:

Ionic CLI : 7.1.1

Utility:

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

System:

NodeJS : v18.15.0
npm : 9.5.0
OS : macOS Unknown

Additional Information

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions