File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -268,11 +268,6 @@ $.widget( "ui.spinner", {
268
268
this . uiSpinner . height ( ) > 0 ) {
269
269
this . uiSpinner . height ( this . uiSpinner . height ( ) ) ;
270
270
}
271
-
272
- // Disable spinner if element was already disabled
273
- if ( this . options . disabled ) {
274
- this . disable ( ) ;
275
- }
276
271
} ,
277
272
278
273
_keydown : function ( event ) {
@@ -429,12 +424,18 @@ $.widget( "ui.spinner", {
429
424
this . _super ( key , value ) ;
430
425
431
426
if ( key === "disabled" ) {
432
- this . _toggleClass ( this . uiSpinner , null , "ui-state-disabled" , ! ! value ) ;
433
- this . element . prop ( "disabled" , ! ! value ) ;
434
- this . buttons . button ( value ? "disable" : "enable" ) ;
427
+ this . _setOptionDisabled ( value ) ;
435
428
}
436
429
} ,
437
430
431
+ _setOptionDisabled : function ( value ) {
432
+ this . _super ( value ) ;
433
+
434
+ this . _toggleClass ( this . uiSpinner , null , "ui-state-disabled" , ! ! value ) ;
435
+ this . element . prop ( "disabled" , ! ! value ) ;
436
+ this . buttons . button ( value ? "disable" : "enable" ) ;
437
+ } ,
438
+
438
439
_setOptions : spinnerModifer ( function ( options ) {
439
440
this . _super ( options ) ;
440
441
} ) ,
You can’t perform that action at this time.
0 commit comments