.val() on empty options returns the text value rather than the value in Blackberry 4.7. Fixes #6932.
This commit is contained in:
parent
396dd21273
commit
392174431a
|
@ -139,7 +139,10 @@ jQuery.fn.extend({
|
|||
|
||||
if ( elem ) {
|
||||
if ( jQuery.nodeName( elem, "option" ) ) {
|
||||
return (elem.attributes.value || {}).specified ? elem.value : elem.text;
|
||||
// attributes.value is undefined in Blackberry 4.7 but
|
||||
// uses .value. See #6932
|
||||
var val = elem.attributes.value;
|
||||
return !val || val.specified ? elem.value : elem.text;
|
||||
}
|
||||
|
||||
// We need to handle select boxes special
|
||||
|
|
Loading…
Reference in a new issue