Skip to content

Fix checkbox trigger specifier when used with checkboxes - #2896

Open
jsonn wants to merge 1 commit into
bigskysoftware:devfrom
jsonn:changed-checkbox
Open

jsonn wants to merge 1 commit into
bigskysoftware:devfrom
jsonn:changed-checkbox

Conversation

@jsonn

@jsonn jsonn commented Sep 11, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

jsonn commented Nov 15, 2025

Copy link
Copy Markdown
Contributor Author

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

@1cg

1cg commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

thank you for this contribution, sorry it sat so long, looks like this affects 4.x too so I'm talking w/ @MichaelWest22 about best fixes

@MichaelWest22

Copy link
Copy Markdown
Collaborator

Fixed in my 4 PR 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.

4 participants