mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Spinner: Remove redundant handling of disabled option on create
Ref #9151 Ref gh-1599
This commit is contained in:
parent
897dc718c6
commit
1397ce4df6
@ -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 ) {
|
||||||
@ -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 ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user