summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-02-18 02:43:23 +0000
committerScott González <scott.gonzalez@gmail.com>2010-02-18 02:43:23 +0000
commit9cabe8403e9755b8226ed2ffdd1034d98de9dcaa (patch)
tree198795d6a0be23cbff606c7f23f089bbab18f6e1
parentb848e37f2835ac4f884ece2dd37273e6266d3623 (diff)
downloadjquery-ui-9cabe8403e9755b8226ed2ffdd1034d98de9dcaa.tar.gz
jquery-ui-9cabe8403e9755b8226ed2ffdd1034d98de9dcaa.zip
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.
-rw-r--r--tests/unit/button/button_events.js9
-rw-r--r--ui/jquery.ui.button.js6
2 files changed, 0 insertions, 15 deletions
diff --git a/tests/unit/button/button_events.js b/tests/unit/button/button_events.js
index 4d563ff58..a2154021d 100644
--- a/tests/unit/button/button_events.js
+++ b/tests/unit/button/button_events.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);
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 47007130b..40b0ee48d 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -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 ],