diff options
-rw-r--r-- | ui/jquery.ui.button.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 31074e2e1..334ff8cbe 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -56,7 +56,9 @@ $.widget( "ui.button", { .bind( "reset.button", formResetHandler ); if ( typeof this.options.disabled !== "boolean" ) { - this.options.disabled = this.element.propAttr( "disabled" ); + this.options.disabled = !!this.element.propAttr( "disabled" ); + } else { + this.element.propAttr( "disabled", this.options.disabled ); } this._determineButtonType(); @@ -72,10 +74,6 @@ $.widget( "ui.button", { options.label = this.buttonElement.html(); } - if ( this.element.is( ":disabled" ) ) { - options.disabled = true; - } - this.buttonElement .addClass( baseClasses ) .attr( "role", "button" ) |