Skip to content

Commit cab1363

Browse files
committed
Slider: Remove redundant handling of disabled option on create
Ref #9151
1 parent 0296e9c commit cab1363

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ui/widgets/slider.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ return $.widget( "ui.slider", $.ui.mouse, {
8181
"ui-widget ui-widget-content" );
8282

8383
this._refresh();
84-
this._setOption( "disabled", this.options.disabled );
8584

8685
this._animateOff = false;
8786
},
@@ -431,7 +430,7 @@ return $.widget( "ui.slider", $.ui.mouse, {
431430
}
432431

433432
if ( key === "disabled" ) {
434-
this._toggleClass( null, "ui-state-disabled", !!value );
433+
this._setOptionDisabled( value );
435434
}
436435

437436
this._super( key, value );
@@ -481,6 +480,12 @@ return $.widget( "ui.slider", $.ui.mouse, {
481480
}
482481
},
483482

483+
_setOptionDisabled: function( value ) {
484+
this._super( value );
485+
486+
this._toggleClass( null, "ui-state-disabled", !!value );
487+
},
488+
484489
//internal value getter
485490
// _value() returns value trimmed by min and max, aligned by step
486491
_value: function() {

0 commit comments

Comments
 (0)