Skip to content

Conversation

@JacobMonticello
Copy link
Contributor

@JacobMonticello JacobMonticello commented Feb 14, 2025

Description

In addEventListener, when the triggerSpec.changed if block was entered, node was being set to event.target. This technically works, but is deprecated and should use evt.target instead like the rest of addEventListener.

Corresponding issue: #3179

Testing

Smoke test a basic changed trigger flow. /hello should get called as expected (meaning that node, and thus node.value are still getting assigned as expected):

<select id="select">
  <option>1</option>
  <option>2</option>
</select>

<div hx-get="/hello" hx-trigger="click changed from:#select"></div>

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 linked an issue Feb 14, 2025 that may be closed by this pull request
@Telroshan Telroshan added the ready for review Issues that are ready to be considered for merging label Feb 14, 2025
@1cg 1cg merged commit e4ecc55 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

ready for review Issues that are ready to be considered for merging

3 participants