Skip to main content

Bug Tracker

Side navigation

#5282 closed bug (worksforme)

Opened September 22, 2009 09:27AM UTC

Closed November 22, 2010 06:02AM UTC

Elements have different order after find("*") and filter() in IE7

Reported by: leif Owned by: leif
Priority: low Milestone: 1.3.2
Component: selector Version: 1.3.2
Keywords: dom order Cc:
Blocked by: Blocking:
Description

$cloned = $(this).clone(true);

$elements = $(this).find("*").andSelf().filter("textarea, select");

$clonedElements = $cloned.find("*").andSelf().filter("textarea, select");

The above snippet gets all elements in the set of $(this). It filters for textareas and selects in the original set and a cloned set. The elements in the sets have different orders, more precisely, they are sorted by type, first textareas then selects. The filtered elements from the cloned set are in a different order. Sometimes this only works once after page reload.

If you filter elements like this:

$clonedElements = $cloned.find("textarea, select").andSelf();

they do not get a new order.

Attachments (0)
Change History (3)

Changed September 24, 2009 02:12AM UTC by dmethvin comment:1

component: unfilledselector
keywords: → dom order
owner: → john

Changed November 19, 2010 01:48AM UTC by dmethvin comment:2

owner: johnleif
status: newpending

Can you provide the markup as well?

Changed November 22, 2010 06:02AM UTC by jitter comment:3

priority: majorlow
resolution: → worksforme
status: pendingclosed

test case works for me.

I believe this bug has been fixed as of jQuery 1.3.2. If you feel this ticket was closed incorrectly, feel free to report back with a reproducible test case and reopen the issue.