Opened 14 years ago
Closed 14 years ago
#4104 closed bug (fixed)
`tag:not(tag.className)` selector fails to return any element in jQuery 1.3.1
Reported by: | maranomynet | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.3.2 |
Component: | selector | Version: | 1.3.1 |
Keywords: | not selector | Cc: | |
Blocked by: | Blocking: |
Description
for this HTML:
<p>Select me.</p>
This happens:
$('p:not(.test)').length == 1; $('p:not(div.test)').length == 1; $('p').not('p.test').length == 1; $('p:not(p.test)').length == 0; // Fail!
Demo/testcase included.
Attachments (2)
Change History (7)
Changed 14 years ago by
Attachment: | jquery.not-selector-bug-demo.zip added |
---|
Changed 14 years ago by
Attachment: | jstest.html added |
---|
comment:1 Changed 14 years ago by
I've attached some more test cases that I discovered independently. You can view the demo live at http://purepistos.net/tmp/jquery-not-selector-bug.html . The selection sets should all be zero, but often they are 4.
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
These ended up being two different bugs - but I've fixed them both. Landed in SVN rev [6206].
comment:3 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I just tested 1.3.2 with the same test cases, and although it fixes nearly all of the cases, this one still fails. The set contains 4 found when it should be zero like the rest of them.
comment:4 Changed 14 years ago by
Oops, sorry, that case IS supposed to return 4. My bad. Please reclose. :)
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Demo of failures of :not() selector.