-
Notifications
You must be signed in to change notification settings - Fork 252
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
fix(click): skip explicit re-dispatch for face #1238
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
there's a bit of a problem with the test setup... jsdom does not yet support FACEs as far as I can see: jsdom/jsdom#3444 So while rudimentary CE tests are possible it seems that e.g. the HTMLLabel implementation does not find the nested FACE :/ Any tips on how to progress here? |
@ph-fritsche would you mind taking a look at this? It's been some time since I fully grokked the behaviour in question and upon updating jsdom to the latest version (in which appropriate tests for this change would even be possible) a few more tests than I was hoping for fail. |
@hesxenon I've rebased the commits onto current main and applied some changes on top. What do you think? |
🎉 This PR is included in version 14.6.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What:
closes #1237
Why:
Re-dispatching a click event on the control of a label is already skipped for labeled controls that are builtin. This change also skips form associated custom elements (FACEs) since they are always classified as labelable elements and are thus handled by the user agent already.
How:
Check whether the
formAssociated
static property exists by reading it from the targets constructor.Checklist: