]> 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:29:04 +0000 (12:29 -0400)
(cherry picked from commit 597a313ab67bc10627d9c17c941776514ea5bd7c)

ui/jquery.ui.button.js

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