You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: ion-button inside of an ion-label not clickable in v6 #24215
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v4.x
v5.x
v6.x
Current Behavior
If you have something like this:
<ion-item><ion-label><ion-buttonexpand="block" @click="doit('In a Label')">In a Label</ion-button></ion-label></ion-item>
The click event will not fire on the button in Ionic v6.
It does work if I do this:
<ion-item><divstyle="flex: auto"><ion-buttonexpand="block" @click="doit('In a Label')">In a Label</ion-button></div></ion-item>
Which is fine. The only reason I was using ion-label in the first place was so the expand="block" on the button would expand into something that took up the width of the screen.
Expected Behavior
Click event would fire, just like in v5.
I doubt this comes up much IRL, it seems like a odd construct to have a list of buttons like that outside of an app that is demoing various features of another thing, so I am totally cool with switching the to use the div that expands.
Steps to Reproduce
The the code repro provided below. Run as-is it will show it working properly in v5. Then do an npm i @ionic/{vue,vue-router}@next to see the issue.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
liamdebeasi commentedon Nov 12, 2021
This commit caused the issue: 2c07a15#diff-c74ddc9584918db0c15a8ba1db280abfe14e7f7632b84e1dfbf74ce86315c6c3R315
Pointer events should not be disabled on the label in this case. We should find another way to ensure the select interface is clickable w/ the label.
joaoeudes7 commentedon Nov 15, 2021
If applied disabled on same component of
IonItemall children are disabledExample:
The
IonButtonisnot clickable because ofdisabledorcontentEditableofIonInputVersions:
liamdebeasi commentedon Jun 9, 2023
Hi everyone,
This was fixed in #24225, but the linked issue was never closed.
ionitron-bot commentedon Jul 9, 2023
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.