Bug Tracker

Ticket #7276 (closed bug: duplicate)

Opened 4 years ago

Last modified 2 years ago

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 4 years ago by snover

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

The first form also selects comment nodes.

 live test case

comment:2 Changed 4 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:3 Changed 4 years ago by danheberden

  • Milestone changed from 1.7 to 1.next

comment:4 Changed 4 years ago by dmethvin

The result is consistent in IE9. Seems like a Sizzle issue.

comment:5 Changed 3 years ago by rwaldron

  • Keywords needsreview removed

comment:6 Changed 2 years ago by dmethvin

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

comment:7 Changed 2 years ago by dmethvin

Duplicate of #5568.

Note: See TracTickets for help on using tickets.