Prerequisites
Ionic Framework Version
v7.x
Current Behavior
Disabled form controls can still be activated by manually dispatching click events. This is happening because we only set pointer-events: none:
This prevents users from clicking on the element, but it does not block manual click dispatches via JS.
Expected Behavior
Disabled form controls should never activate even when a click is manually dispatched.
Steps to Reproduce
- Open code reproduction.
- Click "Dispatch Click".
- Observe that the listed form controls are activated even though they are disabled.
Code Reproduction URL
https://codepen.io/liamdebeasi/pen/yLGQMMG
Ionic Info
N/A
Additional Information
Originally reported on Discord: https://discord.com/channels/520266681499779082/520358571720966154/1159605276203302992
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
Disabled form controls can still be activated by manually dispatching click events. This is happening because we only set
pointer-events: none:ionic-framework/core/src/components/toggle/toggle.scss
Line 68 in 3259da0
This prevents users from clicking on the element, but it does not block manual click dispatches via JS.
Expected Behavior
Disabled form controls should never activate even when a click is manually dispatched.
Steps to Reproduce
Code Reproduction URL
https://codepen.io/liamdebeasi/pen/yLGQMMG
Ionic Info
N/A
Additional Information
Originally reported on Discord: https://discord.com/channels/520266681499779082/520358571720966154/1159605276203302992