Skip to content

Commit 92adcb2

Browse files
committed
Progressbar: Handle disabled option on create, using _setOptionDisabled
Ref #9151
1 parent eb5374a commit 92adcb2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ui/widgets/progressbar.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,18 @@ return $.widget( "ui.progressbar", {
118118
value = Math.max( this.min, value );
119119
}
120120
if ( key === "disabled" ) {
121-
this.element.attr( "aria-disabled", value );
122-
this._toggleClass( null, "ui-state-disabled", !!value );
121+
this._setOptionDisabled( value );
123122
}
124123
this._super( key, value );
125124
},
126125

126+
_setOptionDisabled: function( value ) {
127+
this._super( value );
128+
129+
this.element.attr( "aria-disabled", value );
130+
this._toggleClass( null, "ui-state-disabled", !!value );
131+
},
132+
127133
_percentage: function() {
128134
return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
129135
},

0 commit comments

Comments
 (0)