mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Buttonset: Use :data(button) instead of .ui-button to find buttons that have already been instantiated. This prevents us from finding elements that are proxying buttons, e.g., a radio's label.
Fixes #5242 - radio buttonset with icons does not maintain state.
This commit is contained in:
parent
c16246f502
commit
001a22a9d6
4
ui/jquery.ui.button.js
vendored
4
ui/jquery.ui.button.js
vendored
@ -236,7 +236,7 @@ $.widget( "ui.button", {
|
||||
$.widget( "ui.buttonset", {
|
||||
_create: function() {
|
||||
this.element.addClass( "ui-button-set" );
|
||||
this.buttons = this.element.find( ":button, :submit, :reset, :checkbox, :radio, a, .ui-button" )
|
||||
this.buttons = this.element.find( ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" )
|
||||
.button()
|
||||
.map(function() {
|
||||
return $( this ).button( "widget" )[ 0 ];
|
||||
@ -269,5 +269,5 @@ $.widget( "ui.buttonset", {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$.fn.log = function() { console.log(this); return this; };
|
||||
})( jQuery );
|
||||
|
Loading…
Reference in New Issue
Block a user