-
Notifications
You must be signed in to change notification settings - Fork 296
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
[LionButton] @click event listener is called when button has disabled
and click is trigger programatically using JS .click()
method
#2330
Comments
I looked into this for a few hours:
And its hard to vlaidate this fix, because it is hard to put this problem in an automated test |
This PR: #2354 fixes this issue |
Hi! When @jhuesos showed me the bug in |
Thanks. I've also created this reproduction link in my other issue: https://studio.webcomponents.dev/edit/CdTHK8iuVNqVSuive1NH/src/index.js?p=README.md that shows the difference in behavior for lion button vs native button |
Expected behavior
When a lion-button has the attribute
disabled
, the JavaScript.click()
method should not trigger the @click listener(s)Actual Behavior
Clicking with mouse does respect the disabled attribute, but when calling with the .click() it does not.
https://stackblitz.com/edit/vite-zh1vmm?file=main.js
Additional context
Which component and version of it are you using.
The text was updated successfully, but these errors were encountered: