Skip to content
Browse files

Button: stop disabled button from firing click events. fixes #5945. B…

…ehavior was inconsisten between BUTTON and A elements.
  • Loading branch information...
1 parent 116acb4 commit a7f1659cdc99222a733ed2edbd7d00dc57c30227 @eikes eikes committed May 5, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 ui/jquery.ui.button.js
View
5 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 ) {

0 comments on commit a7f1659

Please sign in to comment.
Something went wrong with that request. Please try again.