Skip to content
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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hesxenon
Copy link

@hesxenon hesxenon commented Nov 6, 2024

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:

  • Documentation
  • Tests
  • Ready to be merged

Copy link

codesandbox-ci bot commented Nov 6, 2024

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.

@hesxenon
Copy link
Author

hesxenon commented Nov 6, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

click leads to endless loop for custom elements in label
1 participant