]> source.dussan.org Git - jquery-ui.git/commitdiff
Button: adding event.preventDefault. Fixes #5945 - Disabled buttons still allow clicks
authorAndrew Powell <andrew@shellscape.org>
Thu, 26 May 2011 16:22:40 +0000 (12:22 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 26 May 2011 16:28:25 +0000 (12:28 -0400)
ui/jquery.ui.button.js

index 3f3b90e925a4e8a641e4a643b69fb85cb3503d6d..32e00e9e054f387e0a0ce418eaf1a123e53324a4 100644 (file)
@@ -97,6 +97,7 @@ $.widget( "ui.button", {
                        })
                        .bind( "click.button", function( event ) {
                                if ( options.disabled ) {
+                                       event.preventDefault();
                                        event.stopImmediatePropagation();
                                }
                        });