Side navigation
#13331 closed bug (fixed)
Opened January 26, 2013 10:55PM UTC
Closed February 01, 2013 11:06PM UTC
Last modified May 24, 2013 01:43PM UTC
jQuery.fn.add returns incorrect order in Chrome and Safari
Reported by: | riscarrott@googlemail.com | Owned by: | gibson042 |
---|---|---|---|
Priority: | blocker | Milestone: | 1.10/2.0 |
Component: | selector | Version: | 1.9.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When using jQuery.fn.add with items outside of the document the ordering is incorrect in Chrome and Safari.
Chrome returns in random order and Safari returns in reverse order.
I'm not actually sure if 'add' promises to maintain any logical order when elements aren't in the document but this didn't happen in jQuery 1.8.3 or below.
Discovered in Chrome 24.0.1312.56 m and Safari 5.1.7 on Windows 7.
Firefox 18.0.1 and IE 9 on Win 7 do not present this behavior.
Attachments (0)
Change History (9)
Changed January 26, 2013 11:02PM UTC by comment:1
Changed January 27, 2013 12:23AM UTC by comment:2
Taking a closer look at this and it appears the bug is with Sizzle.uniqueSort
Changed January 30, 2013 02:04AM UTC by comment:3
component: | unfiled → selector |
---|---|
milestone: | None → 1.9.1 |
owner: | → gibson042 |
priority: | undecided → blocker |
status: | new → assigned |
Sizzle pull request at https://github.com/jquery/sizzle/pull/187
Webkit bug at https://bugs.webkit.org/show_bug.cgi?id=108274
Changed February 01, 2013 11:06PM UTC by comment:4
resolution: | → fixed |
---|---|
status: | assigned → closed |
Update Sizzle: detached node sorting in Webkit. Fixes #13331.
Changeset: 21c7a056e23cd30716db75a62fc7ad7dd23a334b
Changed February 06, 2013 03:55AM UTC by comment:5
Update Sizzle: detached node sorting in Webkit. Fixes #13331.
Changeset: a8518c3bc4e1a8755c2d3a7be624b0e86be1070b
Changed February 06, 2013 03:56AM UTC by comment:6
milestone: | 1.9.1 → 1.9.2 |
---|
Changed February 19, 2013 09:06AM UTC by comment:7
A fix for this landed in http://trac.webkit.org/changeset/143239
Changed May 24, 2013 01:43PM UTC by comment:9
milestone: | 1.9.2 → 1.10/2.0 |
---|
Bulk update to milestone 1.10/2.0
I should have noted it only happens when the one of the jQuery objects contains more than 10 elements.
And to rule out jQuery.fn.clone being the culprit:
http://jsfiddle.net/M9EYX/4/