Bug Tracker

Modify

Ticket #11079 (closed bug: duplicate)

Opened 17 months ago

Last modified 11 months ago

Selector bug: strange interaction between > and :visible

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

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.

Change History

comment:1 Changed 17 months ago by timmywil

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to selector

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.

comment:2 Changed 11 months ago by timmywil

  • Status changed from open to closed
  • Resolution set to duplicate

fixed

comment:3 Changed 11 months ago by timmywil

Duplicate of #11109.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.