Skip to content

Commit 7ceaa61

Browse files
jzaeffererscottgonzalez
authored andcommitted
Progressbar: Handle disabled option on create, using _setOptionDisabled
Ref #9151 Ref jquerygh-1599
1 parent 8d03121 commit 7ceaa61

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

ui/widgets/progressbar.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,16 @@ return $.widget( "ui.progressbar", {
117117
// Don't allow a max less than min
118118
value = Math.max( this.min, value );
119119
}
120-
if ( key === "disabled" ) {
121-
this.element.attr( "aria-disabled", value );
122-
this._toggleClass( null, "ui-state-disabled", !!value );
123-
}
124120
this._super( key, value );
125121
},
126122

123+
_setOptionDisabled: function( value ) {
124+
this._super( value );
125+
126+
this.element.attr( "aria-disabled", value );
127+
this._toggleClass( null, "ui-state-disabled", !!value );
128+
},
129+
127130
_percentage: function() {
128131
return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
129132
},

0 commit comments

Comments
 (0)