Ticket #8554 (closed bug: duplicate)
Selecting on value when value is defined in HTML gives unexpected behavior
|Reported by:||will.murnane@…||Owned by:|
Alter the text in the input box, then click the button. In Chrome/win32 10.0.648.127, I get a message like "Inputs with value ABC: 1; value of the only input: ABCD". Firefox 3.6.12 gives the same behavior. IE 8.0.6001.18702 gives the expected behavior: iff the input tag currently has a value of "ABC", it returns "Inputs with value ABC: 1; value of the only input: ABC"; otherwise, it returns "Inputs with value ABC: 0; value of the only input: $currentval".
This behavior may or may not be intentional, but it should at least match across browsers, and its functionality should be documented. Right now, it seems like the selector works on the value explicitly set in the HTML rather than on the current value.