From 93abe02b6052143fac30393291da3fc254bde996 Mon Sep 17 00:00:00 2001 From: TJ VanToll Date: Mon, 19 Nov 2012 15:42:28 -0500 Subject: Button: Fixing handling of the disabled options on refresh method calls. Fixed #8828 - Button: Refresh does not re-enable disabled button. --- ui/jquery.ui.button.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 3decc2331..b80fca4d9 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -284,7 +284,9 @@ $.widget( "ui.button", { }, refresh: function() { - var isDisabled = this.element.is( ":disabled" ) || this.element.hasClass( "ui-button-disabled" ); + //See #8237 & #8828 + var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" ); + if ( isDisabled !== this.options.disabled ) { this._setOption( "disabled", isDisabled ); } -- cgit v1.2.3