Ticket #12600 (closed bug: fixed)
jQuery('select').is('[value="value"]') works inconsistently depending on number of elements returned
|Reported by:||dschoutens@…||Owned by:||gibson042|
I have distilled the issue as much as possible in a jsFiddle: http://jsfiddle.net/Mj23Q/
Say we've got a jQuery object saved to a variable, x.
If x contains multiple select elements and at least one of them has a value, "1", then:
will return true, since at least one select element matches the value attribute selector given. However, if x only contains a single element, and that element is a select with a value of "1", the same function returns false.
I tested and was able to reproduce this in Chrome 21, Chrome 24 (Canary), Firefox 15, and Internet Explorer 9 for all versions of jQuery provided in jsFiddle.
Sorry if this is a duplicate bug, but I really tried to find an existing bug report. My search-fu might be a little off today.
- Priority changed from undecided to low
- Component changed from unfiled to attributes
- Blocking 11115 added
- Priority changed from low to blocker
- Milestone changed from None to 1.9