Repository navigation
Release 4.5.0 - #642
Merged
Merged
Release 4.5.0#642
Conversation
Moves tests only; the full test names match on jQuery 1.7.2, 3.7.1 and 4.0.0.
ADR-0001: the same three dist files and factory; only the directive moves to the factory top.
A control named parentNode now throws a clear error instead of hanging.
Completes #380: no leaked encoding attribute, enctype, method or absolute action.
The parentNode, tag name and element checks move to form-members.js with the other form member reads.
… clk_y A private store holds the submitter; the expandos are still written when possible and read as a fallback.
Uses SubmitEvent.submitter for outside buttons (form attribute) and requestSubmit(button); a captured click wins.
ajaxSubmit encodes selected files by name, never [object File] (XHR-77, D-03).
…ormUnbind(selector)
clearInputs, attr2, the DOM-not-ready ajaxForm queue, the automatic iframe transport and jQuery before 3.5 each warn once per page.
kevindb
marked this pull request as ready for review
November 10, 2026 23:31
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.
Summary
Releases 4.5.0. The version is bumped in
package.json,package-lock.json,form.jquery.jsonand thesrcheader,distis rebuilt, anddocs/metrics.mdhas a 4.5.0 column. After the merge, taggingv4.5.0on the merge commit publishes it to npm.CodeQL alert 10 (the
targetlookup, which moved tosrc/iframe-transport.jsin the module split) is dismissed as "won't fix", like alert 7 before it:targetandiframeTargetare trusted options. 4.6.0 looks their strings up only as selectors.No breaking changes are intended. Behavior changes only where the old behavior was a bug or differed from native form submission. Details are in
docs/research/4x-behavior-changes.md.src/jquery.form.jsis split into modules. Rollup still emits the same threedistfiles, and the surface tests check the script tag, AMD, ESM and CommonJS entry points.New, additive:
delegation: "<selector>", andajaxFormUnbind(selector).delegation: truenow warns on jQuery 3 and later, where it binds every form on the page (.selector property is removed #353).requestFormat: "json"sends the form as a JSON body (Post json within request body #545, based on PR Add support for post json body (fix #545) #557 by zhangciwu).ajaxSubmiton the jQuery slim build throws a clear error (Incompatible with jQuery 3 slim build #541).debugfor the APIs 5.0 removes.targetresponse withdataFilter, the options that must be trusted input, and what an iframe upload response must look like.Fixes cover the transports (request method, url,
datastrings,beforeSendveto on FormData uploads,uploadProgress), the iframe upload lifecycle (event order, settling exactly once, restoring the form's attributes), and serialization (controls named like form members, disabled fieldsets,semanticform ownership,resetFormmatching native reset,SubmitEvent.submitter).Evidence
main, 4.4.0): 244 tests plus 1 expected failure; one 1606-line source file.After (this branch, locally):
npm test: 912 passed, 2 expected failures, 1 skipped; coverage 100% on statements, branches, functions and lines. The suite passes on jQuery 1.7.2 (886 passed, 14 skipped), 3.7.1 (899) and 4.0.0 (900).npm audit: 0 vulnerabilities. The custom CodeQL queries report 0 results on this tree, and still flag each 4.4.0 advisory sink when it is reopened in the new modules.Merge Danger
Door: two-way
The merge can be reverted. Publishing 4.5.0 to npm afterwards cannot be undone.
Blast Radius: consumers
Code that relied on a fixed bug may notice: for example
methodnow wins overtypeon every transport,falseas the url submits to the form's action,thisin callbacks is the caller'scontext,resetFormkeeps checkbox and hidden values as a native reset does, and disabled fieldset contents are no longer sent.🤖 Generated with Claude Code