Skip to main content

Bug Tracker

Side navigation

#6104 closed bug (invalid)

Opened February 16, 2010 05:21PM UTC

Closed October 06, 2010 01:21AM UTC

Child-selector work incorrectly

Reported by: Octane Owned by:
Priority: low Milestone: 1.4
Component: selector Version: 1.4
Keywords: selector Cc:
Blocked by: Blocking:
Description

<body>

····<span>

········<strong>

············<span><!-- If this <span> does not exist, then the <a> will be found. -->

················<em>

····················<a href="#">a</a>

················</em>

············</span>

········</strong>

····</span>

<script type="text/javascript">

alert($("body > span a").size()); // 0 — elements not found!

</script>

</body>

Attachments (0)
Change History (1)

Changed October 06, 2010 01:21AM UTC by addyosmani comment:1

priority: → low
resolution: → invalid
status: newclosed

Tested the above in the latest versions of Chrome, Safari, FireFox and IE. The output in each is 1 not 0. It's possible that the original submission may have been using an older version of jQuery.

Live test case: http://jsfiddle.net/DbTvy/

Please re-submit your ticket to confirm what browser you were using when testing this bug so that we can perform more tests on that specific browser version.