Bug Tracker

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: [email protected] Owned by:
Priority: undecided Milestone: 1.8
Component: selector Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


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:2 Changed 10 years ago by gibson042

Component: unfiledselector
Milestone: None1.8
Resolution: fixed
Status: newclosed

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.