Skip to main content

Bug Tracker

Side navigation

#5810 closed bug (duplicate)

Opened January 15, 2010 04:12AM UTC

Closed October 15, 2010 04:26AM UTC

Last modified October 15, 2010 04:26AM UTC

`children` selector or scoped selector combined with attribute selectors fail for IMG src attribute

Reported by: dougneiner Owned by: john
Priority: minor Milestone: 1.4.1
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

A really strange selector bug came up the other night when I was helping a user out on Stack Overflow. I have put together an example of how it fails here:

http://pixelgraphics.us/jq/bugs/selector.html

But in summary, whenever you combine the > selector with a scoped select $( "> img[src='...']", scope) or use $(parent).children("img[src='...']") the selector will fail to properly match the element.

If you supply $= to the attribute selector on the same exact calls, the call succeeds. If you use $("parent > img[src='...']") the call also successfully matches the element.

Please let me know if you need more information.

Attachments (0)
Change History (6)

Changed January 15, 2010 04:15AM UTC by dougneiner comment:1

I also should note it is present in both 1.3.2 and 1.4.

Changed February 01, 2010 08:43PM UTC by john comment:2

status: newassigned

Changed August 26, 2010 12:44AM UTC by dmethvin comment:3

See also #5810.

Changed August 26, 2010 12:45AM UTC by dmethvin comment:4

No, really see #6939.

Changed October 15, 2010 04:26AM UTC by snover comment:5

resolution: → duplicate
status: assignedclosed

Changed October 15, 2010 04:26AM UTC by snover comment:6

Duplicate of #7128.