Skip to main content

Bug Tracker

Side navigation

#11079 closed bug (duplicate)

Opened December 20, 2011 04:48PM UTC

Closed June 19, 2012 06:32AM UTC

Last modified June 19, 2012 06:32AM UTC

Selector bug: strange interaction between > and :visible

Reported by: mikecapp Owned by:
Priority: low Milestone: None
Component: selector Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

Demo: http://jsfiddle.net/mikecapp/NgsmC/

jQuery doesn't find a match for the selector "#outer > div:visible span" when the actual DOM path is: (#outer > div > div > span); it looks as though it's erroneously applying the child test to the second, inner div. There's nothing invisible anywhere in this fiddle, but the :visible is definitely needed to trigger the issue.

Attachments (0)
Change History (3)

Changed December 21, 2011 04:45PM UTC by timmywil comment:1

component: unfiledselector
priority: undecidedlow
status: newopen

Confirmed. http://jsfiddle.net/timmywil/NgsmC/3/show/

From right to left, the limits the checkSet to the first visible div (the parent of the span), then verifies that #outer is the div's direct parent, which it is not. I'm not sure of a solution yet. Stopping on the first match is usually correct and helps the performance of all descendent selectors.

Changed June 19, 2012 06:32AM UTC by timmywil comment:2

resolution: → duplicate
status: openclosed

fixed

Changed June 19, 2012 06:32AM UTC by timmywil comment:3

Duplicate of #11109.