':text' is case-sensitive on type whereas '[type=text]' is case-insensitive
|Reported by:||Owned by:|
Documentation for :text selector says $(':text') is equivalent to $('[type=text]') however I have verified that it is not.
Assume want to match <input type="TEXT"> -- N.B.: uppercase TEXT.
'input:text' is case sensitive on type and thus does not match.
'input[type=text]' is case insensitive and thus does match.
The bug is that the :text filter calls elem.getAttribute( "type" ) which returns "TEXT" in this case, whereas elem.type returns "text" in this case.
In the definition of the :text filter function, replace:
var attr = elem.getAttribute( "type" ), type = elem.type;
var attr = elem.getAttribute( "type" ).toLowerCase(), type = elem.type;