htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Fix checkbox trigger specifier when used with checkboxes

Open jsonn opened this issue 1 year ago • 2 comments

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

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

Note: this PR is on top of #2893

jsonn avatar Sep 11 '24 22:09 jsonn

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.

Telroshan avatar Sep 12 '24 09:09 Telroshan

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

jsonn avatar Nov 15 '25 16:11 jsonn