Skip to main content

Bug Tracker

Side navigation

#5480 closed bug (invalid)

Opened November 10, 2009 02:36PM UTC

Closed December 02, 2010 08:07AM UTC

IE7 selector problem

Reported by: ScorpioN Owned by: ScorpioN
Priority: major Milestone:
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Hi! It seems I've found a bug.

I've created several inputs dynamically and set attribute "all=1" to some of them. In FF and IE8 all works fine. But in IE7:

$('input[all]').size() == 8


$('input[all=1]').size() == 2 (this correct)

I'm using jquery 1.3.2.

Attachments (0)
Change History (4)

Changed November 11, 2009 12:40AM UTC by dmethvin comment:1

I suspect the problem is that IE is adding an .all property to every element, which is a collection representing the descendant elements. It was most often used as document.all but it's available on every element. So, where there is no explicit all attribute, jQuery is seeing the all property.

In general, it's a bad idea to add nondistinctive names and properties to html elements. You might want to try "x_all" as your attribute name to avoid collisions.

This is similar to, if not the same as, #3113 which has the problem with form property name/attribute confusion.

Changed June 13, 2010 06:26PM UTC by dmethvin comment:2

component: unfiledselector

Changed November 15, 2010 02:57AM UTC by dmethvin comment:3

owner: → ScorpioN
status: newpending

Can you provide a test case in jsfiddle? I'd like to know which 2 of 8 elements it found.

Changed December 02, 2010 08:07AM UTC by trac-o-bot comment:4

resolution: → invalid
status: pendingclosed

Automatically closed due to 14 days of inactivity.