aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-05-05 05:48:58 -0700
committerScott González <scott.gonzalez@gmail.com>2011-05-05 05:48:58 -0700
commitaf5b5b19483a0a18abe1fbb43cb534a5485f0804 (patch)
treea1fa2e8c031946789e57cb1ed701517daf877cc1 /ui
parent993d37af1d04d586b8b977daf0da3588d63714d9 (diff)
parenta7f1659cdc99222a733ed2edbd7d00dc57c30227 (diff)
downloadjquery-ui-af5b5b19483a0a18abe1fbb43cb534a5485f0804.tar.gz
jquery-ui-af5b5b19483a0a18abe1fbb43cb534a5485f0804.zip
Merge pull request #207 from eikes/bug-5945
Button: stop disabled button from firing click events. fixes #5945.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.button.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 5777d4753..031ac2091 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -103,6 +103,11 @@ $.widget( "ui.button", {
})
.bind( "blur.button", function() {
$( this ).removeClass( focusClass );
+ })
+ .bind( "click.button", function( event ) {
+ if ( options.disabled ) {
+ event.stopImmediatePropagation();
+ }
});
if ( toggleButton ) {