mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
.val() on empty options returns the text value rather than the value in Blackberry 4.7. Fixes #6932.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user