We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eee63a2 commit 3a1031eCopy full SHA for 3a1031e
ui/jquery.ui.button.js
@@ -58,7 +58,9 @@ $.widget( "ui.button", {
58
.bind( "reset.button", formResetHandler );
59
60
if ( typeof this.options.disabled !== "boolean" ) {
61
- this.options.disabled = this.element.prop( "disabled" );
+ this.options.disabled = !!this.element.prop( "disabled" );
62
+ } else {
63
+ this.element.prop( "disabled", this.options.disabled );
64
}
65
66
this._determineButtonType();
@@ -74,10 +76,6 @@ $.widget( "ui.button", {
74
76
options.label = this.buttonElement.html();
75
77
78
- if ( this.element.is( ":disabled" ) ) {
- options.disabled = true;
79
- }
80
-
81
this.buttonElement
82
.addClass( baseClasses )
83
.attr( "role", "button" )
0 commit comments