Opened 10 years ago
Closed 10 years ago
#12673 closed bug (fixed)
Wrong result when a selection is scoped using both the selector and the context param (or using find)
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | 1.8 |
Component: | selector | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
var parent = $("#parent");
$("#parent .child1, #parent .child2") => 2 elements = OK
$("#parent .child1, #parent .child2", parent) => 1 element ?
parent.find("#parent .child1, #parent .child2") => 1 element?
It should return 0 or 2 elements , but 1 element doesn't make sense. Reproduce on: http://jsfiddle.net/GRbHA/3/[[BR]]
I've reported this in Sizzle too: https://github.com/jquery/sizzle/issues/160
Change History (2)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Component: | unfiled → selector |
---|---|
Milestone: | None → 1.8 |
Resolution: | → fixed |
Status: | new → closed |
jQuery 1.8.x and edge find no elements with either $("#parent .child1, #parent .child2", parent)
or parent.find("#parent .child1, #parent .child2")
.
Note: See
TracTickets for help on using
tickets.
jsFiddle is here: http://jsfiddle.net/GRbHA/3