Modify ↓
Ticket #5480 (closed bug: invalid)
IE7 selector problem
| Reported by: | ScorpioN | Owned by: | ScorpioN |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | selector | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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
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.

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.