Skip to main content

Bug Tracker

Side navigation

#3796 closed bug (fixed)

Opened January 06, 2009 06:31PM UTC

Closed January 10, 2009 10:14PM UTC

Last modified January 11, 2009 02:12PM UTC

POS slector related bug

Reported by: balazs.endresz Owned by: john
Priority: major Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:

$('li').not(':odd:first') fails:

because the POS regex matches the colon after :odd that would belong to :first. Then without the colon only first remains wich will wrongly match the TAG selector.

Also in the same regex \\(?(\\d*)\\)? can cause problems, I guess. As in #3793 maybe this should be changed to:


Attachments (0)
Change History (3)

Changed January 09, 2009 07:35PM UTC by balazs.endresz comment:1

Inserting a colon near the end of the POS regex will solve this if there aren't any other characters that can possibly follow the expression. (like maybe a ")" ?)


Changed January 10, 2009 10:14PM UTC by john comment:2

resolution: → fixed
status: newclosed

Fixed here:

Will land in the next merge with jQuery. Thanks for the tip!

Changed January 11, 2009 02:12PM UTC by john comment:3

Changed the final selector portion to a positive lookahead, which resolved the final issue.