Skip to content
Permalink
Browse files

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

…ehavior was inconsisten between BUTTON and A elements.
  • Loading branch information...
eikes committed May 5, 2011
1 parent 116acb4 commit a7f1659cdc99222a733ed2edbd7d00dc57c30227
Showing with 5 additions and 0 deletions.
  1. +5 −0 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.
You can’t perform that action at this time.