Button: adding event.preventDefault. Fixes #5945 - Disabled buttons still allow clicks

(cherry picked from commit 597a313ab6)
This commit is contained in:
Andrew Powell 2011-05-26 12:22:40 -04:00 committed by Scott González
parent ad947c7ba9
commit 3735bab147

View File

@ -96,6 +96,7 @@ $.widget( "ui.button", {
}) })
.bind( "click.button", function( event ) { .bind( "click.button", function( event ) {
if ( options.disabled ) { if ( options.disabled ) {
event.preventDefault();
event.stopImmediatePropagation(); event.stopImmediatePropagation();
} }
}); });