-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v4 beta-11] A disabled ion-button executes his (click) function #15623
Comments
Thanks! |
@mhartington still happens to me, just updated to Example: <ion-button disabled onClick={(e: any) => console.log(e.target.disabled)} /> This actually logs I would expect it to not execute the handler on click, or am I supposed to manually check that? |
This appears to be a stencil/JSX issue vs an issue with the component. In a vanilla example, the button renders correctly and pointer events are disabled. https://codepen.io/mhartington/pen/VEZGBL?editors=1011 But in a stencil app setup, the cc @jthoms1 and @adamdbradley |
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. |
Bug Report
Ionic Info
Describe the Bug
A function associated with a
(click)
on DISABLED ion-button was executed.Steps to Reproduce
Steps to reproduce the behavior:
Related Code
The disabled ion-button in the Toolbar:
The button "SAVE OUTSIDE FORM" is disabled in the toolbar:

When click it, the function associated
saveData()
was executed like we can see on console:Save was Executed with a disabled button
Expected Behavior
A disabled button can't be executed.
Additional Context
Working example here on Github: https://github.com/MrSparklle/Inc4
The text was updated successfully, but these errors were encountered: