Skip to content

Commit

Permalink
Button: stop disabled button from firing click events. fixes #5945. B…
Browse files Browse the repository at this point in the history
…ehavior was inconsisten between BUTTON and A elements.

(cherry picked from commit a7f1659)
  • Loading branch information
eikes authored and scottgonzalez committed May 5, 2011
1 parent 870977a commit 4c218ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/jquery.ui.button.js
Expand Up @@ -102,6 +102,11 @@ $.widget( "ui.button", {
})
.bind( "blur.button", function() {
$( this ).removeClass( focusClass );
})
.bind( "click.button", function( event ) {
if ( options.disabled ) {
event.stopImmediatePropagation();
}
});

if ( toggleButton ) {
Expand Down

0 comments on commit 4c218ee

Please sign in to comment.