Bug Tracker

Modify

Ticket #3887 (closed bug: duplicate)

Opened 4 years ago

Last modified 4 years ago

next selector can match the wrong things

Reported by: dalangalma Owned by: john
Priority: major Milestone: 1.3.1
Component: selector Version: 1.3
Keywords: Cc:
Blocking: Blocked by:

Description

I've found a case where the next selector doesn't seem to work. I've got a selector like "span.foo + a" but it'll match all "a" that are after a "span" (of any class, or no class) that appears after an "a".

So "<span/> <a/>" doesn't match, but the second "a" in "<a/> <span/> <a/>" does. I would expect it to only match "a"s that directly follow a "span" with the class "foo".

Here's the demo:

 http://brh.numbera.com/experiments/browserdemos/jquery-1.3-adjacent.html

I've also attached the same demo file to this ticket.

Attachments

jquery-1.3-adjacent.html Download (1.2 KB) - added by dalangalma 4 years ago.
Repro for next selector bug

Change History

Changed 4 years ago by dalangalma

Repro for next selector bug

comment:1 Changed 4 years ago by john

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

Sounds like this is a duplicate of #3848 (there was a bug with the class filter).

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.