Bug Tracker

Opened 14 years ago

Closed 13 years ago

#5480 closed bug (invalid)

IE7 selector problem

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

Description

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 AND $('input[all=1]').size() == 2 (this correct)

I'm using jquery 1.3.2.

Change History (4)

comment:1 Changed 14 years ago by dmethvin

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.

comment:2 Changed 13 years ago by dmethvin

Component: unfiledselector

comment:3 Changed 13 years ago by dmethvin

Owner: set to ScorpioN
Status: newpending

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

comment:4 Changed 13 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.