Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in addEventListener - use evt instead of event #3188

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

JacobMonticello
Copy link

@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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typo in addEventListener function line 2514 (on version 2.0.4)
2 participants