Skip to content

Conversation

@jsonn
Copy link
Contributor

@jsonn jsonn commented Sep 11, 2024

Description

Unlike other form elements, checkbox elements will return on whether or not they are currently ticked. Explicitly handle this by checking for the tag name and type and then use the checked property.

Testing

A new test case is included, failing before.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

Note: this PR is on top of #2893

@jsonn jsonn changed the base branch from master to dev September 11, 2024 22:59
@Telroshan Telroshan added bug Something isn't working under discussion Issues that are being considered but require further alignment labels Sep 12, 2024
@Telroshan
Copy link
Collaborator

Note: I'm labelling this as "under discussion" until #2891 is processed, as the latter includes some changes that this PR depends on.
If and when #2891 is merged in, this PR's diff will be smaller thus easier to review.

<input type="checkbox"> is special in that it shows up with a value of
"on", even if it is not checked. Introduce a helper function for getting
the effective value of a node by handling this pecularity.
@jsonn
Copy link
Contributor Author

jsonn commented Nov 15, 2025

Rebased on current dev, should be easy to merge now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working under discussion Issues that are being considered but require further alignment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants