summaryrefslogtreecommitdiffstats
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:29:04 -0400
commit3735bab147b663767d2268b90ac27234b1c19fbf (patch)
tree36a9a06ef092116247d7a659209c888036405a4c
parentad947c7ba981a371469bafd34ac7f88dee8995bb (diff)
downloadjquery-ui-3735bab147b663767d2268b90ac27234b1c19fbf.tar.gz
jquery-ui-3735bab147b663767d2268b90ac27234b1c19fbf.zip
Button: adding event.preventDefault. Fixes #5945 - Disabled buttons still allow clicks
(cherry picked from commit 597a313ab67bc10627d9c17c941776514ea5bd7c)
-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 e8a0935dd..1e1d04097 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -96,6 +96,7 @@ $.widget( "ui.button", {
})
.bind( "click.button", function( event ) {
if ( options.disabled ) {
+ event.preventDefault();
event.stopImmediatePropagation();
}
});