fix: changed modifier permanently suppressed requests on form elements - #4035
Merged
1cg merged 3 commits intoSep 17, 2026
Merged
Conversation
Contributor
|
i think changed doesn't work w/ checkboxes & radio buttons as well. Just stumbled on that looking at: |
Collaborator
Author
|
Fixed checkboxes and changed support now. best to just ignore and skip them as changed makes no useful sense for them |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix
changedmodifier on forms (closes #4033)What was broken
hx-trigger="keydown changed"on a<form>silently suppresses every request. Doesn't matter what you type — nothing fires. Works fine on a bare<input>, so it's easy to miss until you try the natural pattern of triggering on the form itself.Why
The
changedblock checked.valueon the element carryinghx-trigger. For a form that'sform.value, which is alwaysundefined:The fix
Track
evt.targetinstead — the actual input the user typed in. That's always correct regardless of whether the listener is on the input directly, a parent form, or afrom:element. Seed on first sight so we don't fire before anything has actually changed.Three tests added: direct input suppression, the form bubbling case from #4033, and two inputs in one form tracked independently.
Corresponding issue:
#4033
Checklist
masterfor website changes,devforsource changes)
approved via an issue
npm run test) and verified that it succeeded