jQuery 1.8.1 Released

Posted on by

It’s been a frantic but productive few weeks, and the jQuery core team is pleased to announce that jQuery 1.8.1 is released! This version fixes the issues reported by the community following the final release of 1.8.0. Here are the files, ready for you to use:

The Google and Microsoft CDNs will also have copies available soon.

The final set of bugs that were fixed are listed below. Don’t forget, folks, we love to hear about bugs in the betas and release candidates too! You don’t have to wait for a final release to test with your code. The earlier we can fix these bugs, the smoother things go for both the team and the jQuery community.

Use jQuery UI 1.8.23 and jQuery Mobile 1.1.1 or later for best compatibility with jQuery core 1.8.1.

Don’t use Quirks mode! jQuery has never supported Quirks mode and we do not perform any testing in Quirks. This can affect values like $("window").height(), and the jQuery 1.8 Quirks mode results did change in order to support some modern browser features. The majority of problem cases we’ve seen are from developers that wanted to be in Standards mode but had an invalid doctype or extraneous markup before their <html> tag. When in doubt, use the simple and short <!doctype html>.

Sizzle’s custom pseudo-selectors that take arguments have changed, but jQuery 1.8.1 provides a compatibility shim for older code. Neither Sizzle nor jQuery documented how these worked before; there is now official documentation for Sizzle. Look there for an example of best practice on writing custom pseudo-selectors that work with all versions of jQuery.

Many thanks to the team and community members who contributed patches for this release: Timmy Willison, Mike Sherov, Elijah Manor, Mike Pennisi, Richard Gibson, Corey Frang, Mathias Bynens, Oleg Gaidarenko, Nikita Govorov, Julian Aubourg, and Rick Waldron.

We’re also very appreciative to those of you who took the time to create good bug reports for jQuery 1.8.1. In the highly unlikely event we somehow managed to leave any bugs in this release, please do let us know. First check the bug tracker to see if it has already been reported. If not, create a test case using jsFiddle.net or jsbin.com with the least possible code that it takes to demonstrate the problem.

jQuery 1.8.1 Change Log

Ajax

  • #12233: jQuery.post() raises "RangeError: Maximum call stack size exceeded"
  • #12234: the .load() method,when params is null, the ajax type will be "POST", but not be "GET"

Core

  • #12282: 1.8.0 regression – document ready is fired too early on IE 9/10
  • #12329: event.js still has a reference to bindReady
  • #12350: jQuery.trim should remove byte-order-mark (BOM) characters
  • #12370: jquery android 2.1-update1 problem

Css

  • #12235: getComputedStyle is used without namespace
  • #12313: .height() and .width() no longer fall back to CSS if offsetWidth is undefined.
  • #12324: cssNormalTransform can produce wrong values

Data

  • #10863: .data method does not return an object if the JSON string contains newlines.

Dimensions

  • #12283: jQuery 1.8 outerHeight is returning undefined instead of null

Effects

  • #12273: animate fails with 0 duration

Event

  • #12149: 'change' event handler leaks in IE7/8
  • #12383: jQuery.on() selector should only apply to descendants of the element

Manipulation

  • #12346: fn.append not working correctly
  • #12384: .after fails with table rows in IE9

Queue

  • #12278: .promise(type) not working for non-default queue

Selector

  • #12205: Miscellaneous pseudo selector issues
  • #12237: Having child selector and multiple :not with :visible does not work any more
  • #12241: Passing a negative index for :eq throws a syntax error.
  • #12285: Selector with :not(:first) isn't working since 1.8
  • #12292: Invalid selectors can cause a subsequent valid selector not to work
  • #12303: Attribute selector fails if the attribute value contains :first :last
  • #12311: jQuery 1.8 and .is(":visible")
  • #12314: $.contains fatal error in IE9 when 2nd parameter is null
  • #12359: 1.8.0 creating invalid tag/attribute when loading the library
  • #12369: ajax, use find method for read xml
  • #12403: Selector "> li > :first-child,> :not(li):even" fails in old IE
  • #12409: Back-compat issue with custom pseudo selectors
  • #12412: Sizzle regression ":not([data-role='list-divider']):not(:hidden)"
  • #12419: Composite selector fails if id attribute contains dot.

Support

  • #12333: $.browser.webkit (undefined) -> $.browser.chrome

31 thoughts on “jQuery 1.8.1 Released

  1. Morris on said:

    Noticed a pointless guard in jQuery.support():

    a = div.getElementsByTagName(“a”)[ 0 ];
    a.style.cssText = “top:1px;float:left;opacity:.5”;
    // Can’t get basic test support
    if ( !all || !all.length || !a ) {
    return {};
    }

    The test for !a is pointless, because a.style.cssText will throw an exception before !a is reached.

    Cheers

  2. Woohoo! Even with the bad “document ready is fired too early” bug, I wasn’t expecting to get this update until after the US holiday.

    Onward to 2.0 now :) The rest of yous: start moving your sites off of jquery 1.4 and 1.5 before you complain that you can’t use version 2.1 because you have sites in China ;)

  3. Congratulations to the jQuery team!

    Your framework is perfect and your support fast and very good. I’ll test the new version this evening and then wait for the google CDN. ;)

    Thanks a lot!

    Mike

  4. Anthony on said:

    IE stuff is working much better. It fixed a couple issues, that I didn’t even realize were in the jquery 1.8 library. Thanks!!!

  5. Seeing a serious performance issue on our large web-app with 1.8.1 that isn’t present when using 1.8.1

    Most noticeable whilst typing into textboxes (delays of about 500ms after each keypress) and clicking around form elements.

    The app has a large DOM, but 1.8.0 handles it fine.

  6. Ult Combo on said:

    Awesome and fast fixes! I noticed that not only the issues listed there but also some [http://bugs.jquery.com/ticket/12416 other] regressions were fixed too.

    Any ideas when 1.8.1 will available in the Google CDN?

  7. Ult Combo on said:

    Would be nice for these comments to use a mini-markup editor like the Bugtracker’s too. =]

  8. Vlakoff on said:

    The issue raised by Morris is because this CSS was previously set inline in the div.innerHTML assignment.

    Maybe the a.style.cssText assignement should moved just after the !a test.

  9. Will you make an online tool to allow people to custom jQuery 1.8.x ?
    I’m not a great developper, I don’t understand your ‘grunt-thing’. :)

  10. I second Simon’s comment on the performance (at least for IE8). I have a complex UI using jsTree, autocompletes, .on() event handlers and just focusing a textbox takes a very noticable pause with 1.8.1 that was not present in 1.8.0

    I don’t know what details I could provide that would be useful, let me know.

  11. David, the first argument must be, in fact, an element.

    I advise you to stop using $._data(element, “events”) for your production code. Read “What’s been removed” section from the release notes of JQuery 1.8 (http://blog.jquery.com/2012/08/09/jquery-1-8-released/):

    “you can still get to the events data for debugging purposes via $._data(element, “events”). Note that this is not a supported public interface; the actual data structures may change incompatibly from version to version.”

  12. Stefan Hayden on said:

    I am also seeing slow performance in ie 7,8,9. I see this slow performance in both 1.8 and 1.8.1. I do not see this slowness in 1.7.2 or lower. I would file a bug report but I can’t figure out what the issue is.

    The slowness is really weird because it seems to effect everything. Even link hover effects that are pure css have delays in seeing the effects. At this point I can not arrow it down but will keep trying to find the issue.

  13. Zachary Pudil on said:

    I’m experiencing the same exact performance issue that Setfan Hayden is experiencing, but only with IE 7. IE 8 and 9 are working perfectly.

  14. There are some invisible non-ASCII characters in the minified version which cause my text editor to behave very strangely when trying to navigate. I’m not sure what other issues this might cause when in production — perhaps the performance issue mentioned above?

  15. I’m experiencing the same slowness but on all browsers, 1.7.2 is running smooth with the same code.

  16. We attempted to upgrade jQuery to 1.8.1 and jQuery UI to 1.8.23. In IE 6 and 7 we started receiving your typical, “A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer might become unresponsive.” We reverted back to 1.7.1 and the error goes away, jQuery UI works fine at the latest version with the old version of jQuery. I’m sure it’s an errant selector on our side, but definitely an issue with things running slower.

  17. I agree with the group. IE’s performance works fine for jQuery 1.7.2, but when upgrading to 1.8.1, we are experiencing some lag time between events. We have bound change and blur events to input fields. When the .on() selection is bound to a large number of elements, 1.8.1 takes a performance hit when tabbing. jQuery 1.7.2 does not show this behavior. I am reverting back to 1.7.2 until this gets addressed.

  18. I had to revert as well. 1.8.1 is totally unusable. Experiencing the same issues as above in all browsers in all platforms. Events are responding slow. DOM updates thats faster than lightening on 1.8.0 takes seconds.

    PLEASE FIX!

  19. ChenChi on said:

    I also encountered serious performance issues for my web applications on IE8. If the content on a single page is big, let’s say 700+ UI elements, the performance is very very POOR. Ticking a radio button takes more than 6 seconds. Keying in some stuff in a textbox almost hangs on the application.

    Reverting back to Ver 1.7.2, no such performance issue occurred.

  20. Matt Steitle on said:

    re: Michael, non-ascii characters

    I have a python function that does some manipulation of a final build script containing jQuery and it results in a 500 error returned, citing the non-ascii characters as the cause. jQuery 1.8.2

  21. I am also experiencing problems with jQuery DataTables (http://www.datatables.net) compatibility since 1.8.x (1.8 was the last version working). Sadly – the combo of DataTables + jQuery 1.8.x/1.9.x turns all the jQuery goodness completely down.

    I think that DataTables plugin update should be already on the way… Main issue was with AutoFill…

  22. [FIXED] My issue with DataTables compatibility was actually caused by using sub-plugin for DT, the “AutoFill” that utilises deprecated .live command and killed my other jQuery goodness on the site.

    When I’ve removed all the references to this plugin from all my scripts, all the jQuery goodness went back to normal.

    Just to fyi if you are interested ;-)

  23. i am not able to open and idle time pop up(when idle for 15 min it will open) if i used the jquery.sparkline.min.js Jquery.