Lion Button should not react to clicks when its disabled #2354
+29
−22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes: #2330 and is blocked by: #2353 (includes changes from this PR as well)
disabled
and click is trigger programatically using JS.click()
method #2330 in automated tests.static formAssociated = true
to the LionButton which fixes the problem at hand. I don't know what is this and why it fixes the issue, but it works in both the automated test and in my manual tests. (and does not break any other test, so I assume it should be good). I first read about it here: https://webkit.org/blog/13711/elementinternals-and-form-associated-custom-elements/, and then I found some references to it in the@webcomponents/scoped-custom-element-registry
fromnode_modules
.If I found any more information about the
formAssociated
, I'll share. If anyone knows what is this and why it fixes the issue, please knowledge-share 🙏To see the diff only added in this branch in isolation, look at this commit: 4db7ab2