mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Buttonset: Ignore hidden buttons. Fixes #5946 - buttonset should ignore buttons that are not :visible.
This commit is contained in:
parent
7692b6e65f
commit
9060bf3d09
@ -5,6 +5,11 @@
|
||||
|
||||
module("button: tickets");
|
||||
|
||||
|
||||
test("#5946 - buttonset should ignore buttons that are not :visible", function() {
|
||||
$( "#radio01" ).next().wrap( "<div></div>" ).parent().hide();
|
||||
var set = $( "#radio0" ).buttonset();
|
||||
ok( set.find( "label:eq(0)" ).is( ".ui-button:not(.ui-corner-left)" ) );
|
||||
ok( set.find( "label:eq(1)" ).is( ".ui-button.ui-corner-left" ) );
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
2
ui/jquery.ui.button.js
vendored
2
ui/jquery.ui.button.js
vendored
@ -339,12 +339,14 @@ $.widget( "ui.buttonset", {
|
||||
return $( this ).button( "widget" )[ 0 ];
|
||||
})
|
||||
.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
|
||||
.filter( ":visible" )
|
||||
.filter( ":first" )
|
||||
.addClass( "ui-corner-left" )
|
||||
.end()
|
||||
.filter( ":last" )
|
||||
.addClass( "ui-corner-right" )
|
||||
.end()
|
||||
.end()
|
||||
.end();
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user