Modify ↓
Ticket #7276 (closed bug: duplicate)
Inconsistent element selection in IE
| Reported by: | Keith Clark | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.next |
| Component: | selector | Version: | 1.4.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
These two statements (effectively identical) return different elements in IE:
console.log($(":not(body)").length)
console.log($("*:not(body)").length)
Try it on the jQuery home page in IE's developer tools console.
Change History
comment:1 Changed 3 years ago by snover
- Priority changed from undecided to high
- Status changed from new to open
- Component changed from unfiled to selector
comment:2 Changed 2 years ago by danheberden
- Keywords needsreview added
- Milestone set to 1.7
Given how IE sees nodes vs other browsers, I don't think this is something worth addressing.
comment:4 Changed 2 years ago by dmethvin
The result is consistent in IE9. Seems like a Sizzle issue.
comment:5 Changed 23 months ago by rwaldron
- Keywords needsreview removed
Triage confirmed. Further reduction: http://jsfiddle.net/rwaldron/56K3B/
Screenshot IE6: http://gyazo.com/640652b235e8ee7eff342dab2d535293.png
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

The first form also selects comment nodes.
live test case