Skip to content

Commit

Permalink
Spinner: Remove redundant handling of disabled option on create
Browse files Browse the repository at this point in the history
Ref #9151
Ref gh-1599
  • Loading branch information
jzaefferer authored and scottgonzalez committed Sep 25, 2015
1 parent 897dc71 commit 1397ce4
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions ui/widgets/spinner.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -268,11 +268,6 @@ $.widget( "ui.spinner", {
this.uiSpinner.height() > 0 ) { this.uiSpinner.height() > 0 ) {
this.uiSpinner.height( this.uiSpinner.height() ); this.uiSpinner.height( this.uiSpinner.height() );
} }

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


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


this._super( key, value ); this._super( key, value );
},


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


_setOptions: spinnerModifer( function( options ) { _setOptions: spinnerModifer( function( options ) {
Expand Down

0 comments on commit 1397ce4

Please sign in to comment.