Skip to content

Commit 897dc71

Browse files
jzaeffererscottgonzalez
authored andcommitted
Slider: Remove redundant handling of disabled option on create
Ref #9151 Ref gh-1599
1 parent d2f6204 commit 897dc71

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ui/widgets/slider.js

Lines changed: 6 additions & 5 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
},
@@ -430,10 +429,6 @@ return $.widget( "ui.slider", $.ui.mouse, {
430429
valsLength = this.options.values.length;
431430
}
432431

433-
if ( key === "disabled" ) {
434-
this._toggleClass( null, "ui-state-disabled", !!value );
435-
}
436-
437432
this._super( key, value );
438433

439434
switch ( key ) {
@@ -481,6 +476,12 @@ return $.widget( "ui.slider", $.ui.mouse, {
481476
}
482477
},
483478

479+
_setOptionDisabled: function( value ) {
480+
this._super( value );
481+
482+
this._toggleClass( null, "ui-state-disabled", !!value );
483+
},
484+
484485
//internal value getter
485486
// _value() returns value trimmed by min and max, aligned by step
486487
_value: function() {

0 commit comments

Comments
 (0)