jQuery 3.6.0 Released!

Posted on by

jQuery 3.6.0 has been released! In jQuery 3.5.0, the major change was a security fix for the html prefilter. This release does not include a security fix, but does have some good bug fixes and improvements. We still have our eyes on a jQuery 4.0 release, but until then we will continue to support the 3.x branch and address important issues.

As usual, the release is available on our cdn and the npm package manager. Other third party CDNs will probably have it soon as well, but remember that we don’t control their release schedules and they will need some time. Here are the highlights for jQuery 3.6.0:

Returning JSON even for JSONP errors

You may have guessed from the minor version that a feature snuck into this release. In previous versions, when a JSONP request responded with an error, often the response was still an executable script. We’ve changed the default behavior to try and execute the response in this situation. Normal scripts will still be skipped when an error is encountered. See gh-4771 for more information.

Fixes

One bug worth highlighting has to do with redirecting focus to another element in a focus handler. Take this example where a focus handler is triggered inside another focus handler:

elem1.on( "focus", function() {
  elem2.trigger( "focus" );
} );

Due to their synchronous nature everywhere outside of IE, a fix added in 3.4.0 to leverage native events caused the native .focus() method to be called last for the initial element, making it steal the focus back. While the code continues to leverage native focus and blur events, we were able to fix this by aligning even more with native methods and only propagating the last focus event up the DOM tree.

Other bug fixes and improvements include a fix for retrieving dimensions on table rows in Firefox, a fix for a crash in Chrome when a focusout event was triggered on a removed element, several improvements to some tests, and more. You’ll find the full changelog below.

Upgrading

Aside from the change to no longer ensure XHTML-compliant tags for you, we do not expect other compatibility issues when upgrading from a jQuery 3.0+ version. To upgrade, have a look at the new 3.5 Upgrade Guide. If you haven’t yet upgraded to jQuery 3+, first have a look at the 3.0 Upgrade Guide.

The jQuery Migrate plugin will help you to identify compatibility issues in your code. Please try out this new release and let us know about any issues you experienced.

If you can’t yet upgrade to 3.5+, Daniel Ruf has kindly provided patches for previous jQuery versions.

Download

You can get the files from the jQuery CDN, or link to them directly:

https://code.jquery.com/jquery-3.6.0.js

https://code.jquery.com/jquery-3.6.0.min.js

You can also get this release from npm:

npm install jquery@3.6.0

Slim build

Sometimes you don’t need ajax, or you prefer to use one of the many standalone libraries that focus on ajax requests. And often it is simpler to use a combination of CSS and class manipulation for web animations. Along with the regular version of jQuery that includes the ajax and effects modules, we’ve released a “slim” version that excludes these modules. The size of jQuery is very rarely a load performance concern these days, but the slim build is about 6k gzipped bytes smaller than the regular version. These files are also available in the npm package and on the CDN:

https://code.jquery.com/jquery-3.6.0.slim.js

https://code.jquery.com/jquery-3.6.0.slim.min.js

These updates are already available as the current versions on npm and Bower. Information on all the ways to get jQuery is available at https://jquery.com/download/. Public CDNs receive their copies today, please give them a few days to post the files. If you’re anxious to get a quick start, use the files on our CDN until they have a chance to update.

Thanks

Thank you to all of you who participated in this release by submitting patches, reporting bugs, or testing, including Dallas Fraser, Michal Golebiowski-Owczarek, Wonseop Kim, Wonhyoung Park, Beatriz Rezener, Natalia Sroka, and the whole jQuery team.

Changelog

Full changelog: 3.6.0

Ajax

Core

Deferred

Dimensions

  • Modify reliableTrDimensions support test to account for FF (#4529, bcd40aa7)

Docs

  • Change JS Foundation mentions to OpenJS Foundation (db43ef0b)

Event

Selector

Support

  • ensure display is set to block for the support div (#4844) (#4832, f8bdb127)

Tests

  • Fix tests for not auto-executing scripts without dataType (7298e04f)
  • Skip the jQuery.parseXML error reporting test in Legacy Edge (bf06dd47)
  • Fix the jQuery.parseXML error reporting test (1ec36332)
  • Recognize callbacks with dots in the Node.js mock server (4c572a7f)
  • Skip the “jQuery.ajax() on unload” test in Safari (4f016c64)
  • Remove an unused local variable (beea433d)
  • Remove remaining obsolete jQuery.cache references (5e028c76)
  • Remove obsolete jQuery data tests (8ad78cdb)

7 thoughts on “jQuery 3.6.0 Released!

  1. Davowebs on said:

    Long awaited version, thanks for the updates and always appreciate the hard work.

  2. Fazer Página on said:

    I am really glad jquery is still being maintained! Will keep using it!

  3. Danny on said:

    Thank you for this release. I was able to easily upgrade from 3.5.1 to 3.6.0 without any issues. I appreciate all the hard work you that you put into maintaining and improving jQuery as a lot of us still depending on jQuery for fairly large projects who run in production.

  4. Danny on said:

    Thank you for this release. I was able to easily upgrade from 3.5.1 to 3.6.0 without any issues. I appreciate all the hard work you that you put into maintaining and improving jQuery as a lot of us still depend on jQuery for fairly large projects who run in production.

  5. David on said:

    Great, thanks for the release, upgraded without any issues, which is one of the many advantages of jQuery.