From 1489d7380d02828e6f496fba24679995c4fdae44 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Mon, 15 Mar 2010 14:13:17 +0000 Subject: [PATCH] Button: fixed #5324 - button disabled state doesn't get refreshed when disabled set on original element --- ui/jquery.ui.button.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 854fdc8e3..2f26e3158 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -240,6 +240,10 @@ $.widget( "ui.button", { }, refresh: function() { + var isDisabled = this.element.is(":disabled"); + if ( isDisabled !== this.options.disabled ) { + this._setOption( "disabled", isDisabled ); + } if ( this.type === "radio" ) { radioGroup( this.element[0] ).each(function() { if ( $( this ).is( ":checked" ) ) { -- 2.39.5