aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Powell <andrew@shellscape.org>2011-05-26 12:22:40 -0400
committerScott González <scott.gonzalez@gmail.com>2011-05-26 12:28:25 -0400
commit597a313ab67bc10627d9c17c941776514ea5bd7c (patch)
tree913ed380e82f69b75c36ccb6c5656616ed442bd1
parentc49dbe0f0120dec9922d5cb6459a93d33ef41579 (diff)
downloadjquery-ui-597a313ab67bc10627d9c17c941776514ea5bd7c.tar.gz
jquery-ui-597a313ab67bc10627d9c17c941776514ea5bd7c.zip
Button: adding event.preventDefault. Fixes #5945 - Disabled buttons still allow clicks
-rw-r--r--ui/jquery.ui.button.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 3f3b90e92..32e00e9e0 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -97,6 +97,7 @@ $.widget( "ui.button", {
})
.bind( "click.button", function( event ) {
if ( options.disabled ) {
+ event.preventDefault();
event.stopImmediatePropagation();
}
});