Skip to content

Conversation

@scrhartley
Copy link
Contributor

Description

When hx-target is inherited, currently the value of event.detail.target for htmx:targetError is null.
This value should instead be the value that htmx was using to try to resolve the target.

Testing

Added a test for the event when inheritance is not being used, since that seemed to not exist yet.
Then added a test which uses an inherited value for hx-target.
(I also manually tested that the event doesn't fire when the inherited target does exist.)

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
@Telroshan Telroshan added the bug Something isn't working label Feb 10, 2025
@Telroshan Telroshan added the ready for review Issues that are ready to be considered for merging label Feb 10, 2025
@1cg 1cg merged commit 075ed73 into bigskysoftware:dev Jun 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready for review Issues that are ready to be considered for merging

3 participants