Open AadhavanVA opened 1 year ago
@AadhavanVA
Can we make onclick = null
, when assigning the disable
attribute to the button?
function disableButton() { myButton.setAttribute('disabled', true); myButton.onclick = null; }
Or can we use css property here for making that disable ?
style="pointer-events: none;"
Component fw-button - https://crayons-next.freshworks.com/components/core/button/
Describe the bug Disabled button still fired the onclick method attached to it.
To Reproduce Attaching the recording for reference below
https://user-images.githubusercontent.com/81296340/234239618-b8dfd833-cde0-4c83-8889-f2fbb5ff9c7c.mov
Expected behavior The disabled button should not trigger onclick method attached to it.