mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
parent
a3cd88f14b
commit
92cbf5362c
@ -71,11 +71,10 @@ jQuery.extend({
|
||||
valHooks: {
|
||||
option: {
|
||||
get: function( elem ) {
|
||||
// Use proper attribute retrieval(#6932, #12072)
|
||||
var val = jQuery.find.attr( elem, "value" );
|
||||
return val != null ?
|
||||
val :
|
||||
elem.text;
|
||||
jQuery.text( elem );
|
||||
}
|
||||
},
|
||||
select: {
|
||||
|
@ -1448,3 +1448,12 @@ test( "coords returns correct values in IE6/IE7, see #10828", function() {
|
||||
area = map.html("<area shape='rect' coords='0,0,0,0' href='#' alt='a' />").find("area");
|
||||
equal( area.attr("coords"), "0,0,0,0", "did not retrieve coords correctly" );
|
||||
});
|
||||
|
||||
test( "should not throw at $(option).val() (#14686)", 1, function() {
|
||||
try {
|
||||
jQuery( "<option/>" ).val();
|
||||
ok( true );
|
||||
} catch ( _ ) {
|
||||
ok( false );
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user