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.
Change History (12)
comment:5 Changed 4 years ago by timmywil
- Component changed from unfiled to attributes
- Priority changed from undecided to low
comment:6 Changed 4 years ago by gibson042
- Blocking 11115 added
comment:7 Changed 3 years ago by gibson042
- Milestone changed from None to 1.9
- Priority changed from low to blocker