mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
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.
This commit is contained in:
parent
b848e37f28
commit
9cabe8403e
@ -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);
|
||||
|
6
ui/jquery.ui.button.js
vendored
6
ui/jquery.ui.button.js
vendored
@ -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 ],
|
||||
|
Loading…
Reference in New Issue
Block a user