Side navigation
#5046 closed bug (wontfix)
Opened August 13, 2009 02:13PM UTC
Closed August 13, 2009 04:55PM UTC
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: | ||
Blocked by: | Blocking: |
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 (1)
Change History (1)
Changed August 13, 2009 04:55PM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
The type attribute does not behave consistently between browsers. You should use the custom selectors, e.g., :text, to search for inputs of a specific type.