Skip to content
Permalink
Browse files

Buttonset: Use :data(button) instead of .ui-button to find buttons th…

…at 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.
  • Loading branch information
scottgonzalez committed Mar 2, 2010
1 parent c16246f commit 001a22a9d68eae09a056271804d980e65da636e1
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/jquery.ui.button.js
@@ -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 );

0 comments on commit 001a22a

Please sign in to comment.
You can’t perform that action at this time.