Ticket #5282 (closed bug: worksforme)
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: | |
| Blocking: | Blocked by: |
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.
Change History
comment:1 Changed 4 years ago by dmethvin
- Keywords dom order added
- Owner set to john
- Component changed from unfilled to selector
comment:2 Changed 3 years ago by dmethvin
- Owner changed from john to leif
- Status changed from new to pending
Can you provide the markup as well?
comment:3 Changed 3 years ago by jitter
- Priority changed from major to low
- Status changed from pending to closed
- Resolution set to worksforme
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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
