Skip to content
Permalink
Browse files

Spinner: Remove redundant handling of disabled option on create

Ref #9151
Ref gh-1599
  • Loading branch information
jzaefferer authored and scottgonzalez committed Sep 25, 2015
1 parent 897dc71 commit 1397ce4df68e65cb4d417e34e12f13908798234c
Showing with 7 additions and 10 deletions.
  1. +7 −10 ui/widgets/spinner.js
@@ -268,11 +268,6 @@ $.widget( "ui.spinner", {
this.uiSpinner.height() > 0 ) {
this.uiSpinner.height( this.uiSpinner.height() );
}

// Disable spinner if element was already disabled
if ( this.options.disabled ) {
this.disable();
}
},

_keydown: function( event ) {
@@ -427,12 +422,14 @@ $.widget( "ui.spinner", {
}

this._super( key, value );
},

if ( key === "disabled" ) {
this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );
this.element.prop( "disabled", !!value );
this.buttons.button( value ? "disable" : "enable" );
}
_setOptionDisabled: function( value ) {
this._super( value );

this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );
this.element.prop( "disabled", !!value );
this.buttons.button( value ? "disable" : "enable" );
},

_setOptions: spinnerModifer( function( options ) {

0 comments on commit 1397ce4

Please sign in to comment.
You can’t perform that action at this time.