Ticket #5046 (closed bug: wontfix)
inconsistent "input[type=text]" selector results
| Reported by: | tngd | Owned by: | john |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | selector | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I observed an inconsistency when using the selector "input[type=text]" in Firefox 3.5.2 and Chrome 2.0.172.39 (windows xp).
If I have 4 input elements, the first 2 don't have the attribute type defined, and the last 2 have an explicit type attribute with the value "text".
When using the selectors "input[type=text]" and "input[type=text]:eq(1)" I get unexpected results in FF 3.5, Chrome 2 (and IE8).
input[type=text]
FF and Chrome: the last 2 input elements are selected
IE8: all 4 input elements are selected
input[type=text]:eq(1)
IE8, FF and Chrome: the second element is selected
I would expect FF and Chrome to select the fourth element and not the second since it wasn't included in the first selector results.
On the other hand, it should select all 4 elements when using the first selector to be consistent with the second selector (or/and to be consistent with IE8 results).
Test case attached.
Attachments
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.

