Button: fixed #5324 - button disabled state doesn't get refreshed when disabled set on original element

This commit is contained in:
Richard Worth 2010-03-15 14:13:17 +00:00
parent e3096c7abb
commit 1489d7380d

View File

@ -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" ) ) {