Skip to content
Permalink
Browse files

Buttons: Removed the logic for triggering click events on checkboxes …

…and radio buttons. This logic was actually causing the opposite functionality from what we wanted.

Fixes #5195 - .buttonset() prevents change event from being catchable.
  • Loading branch information
scottgonzalez committed Feb 18, 2010
1 parent b848e37 commit 9cabe8403e9755b8226ed2ffdd1034d98de9dcaa
Showing with 0 additions and 15 deletions.
  1. +0 −9 tests/unit/button/button_events.js
  2. +0 −6 ui/jquery.ui.button.js
@@ -5,13 +5,4 @@

module("button: events");

test("click-through", function() {
expect(2);
var set = $("#radio1").buttonset();
set.find("input:first").click(function() {
ok( true );
});
ok( set.find("label:first").click().is(".ui-button") );
});

})(jQuery);
@@ -73,9 +73,6 @@ $.widget( "ui.button", {
return;
}
$( this ).toggleClass( "ui-state-active" );
self.element
.attr( "checked", !self.element[0].checked )
.click();
self.buttonElement.attr( "aria-pressed", self.element[0].checked );
});
} else if ( this.type === "radio") {
@@ -84,9 +81,6 @@ $.widget( "ui.button", {
return;
}
$( this ).addClass( "ui-state-active" );
self.element
.attr( "checked", true )
.click();
self.buttonElement.attr( "aria-pressed", true );

var radio = self.element[ 0 ],

0 comments on commit 9cabe84

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