From 3735bab147b663767d2268b90ac27234b1c19fbf Mon Sep 17 00:00:00 2001 From: Andrew Powell Date: Thu, 26 May 2011 12:22:40 -0400 Subject: [PATCH] Button: adding event.preventDefault. Fixes #5945 - Disabled buttons still allow clicks (cherry picked from commit 597a313ab67bc10627d9c17c941776514ea5bd7c) --- ui/jquery.ui.button.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index e8a0935dd..1e1d04097 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -96,6 +96,7 @@ $.widget( "ui.button", { }) .bind( "click.button", function( event ) { if ( options.disabled ) { + event.preventDefault(); event.stopImmediatePropagation(); } });