Skip to content

Commit

Permalink
Spinner: Don't change value when changing min/max options
Browse files Browse the repository at this point in the history
Fixes #9703
Closes jquerygh-1252
  • Loading branch information
petersendidit committed May 26, 2014
1 parent 9a93a06 commit 796a8b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/unit/spinner/spinner_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ test( "stop", function() {
});

asyncTest( "change", function() {
expect( 14 );
expect( 12 );
var element = $( "#spin" ).spinner();

function shouldChange( expectation, msg ) {
Expand Down Expand Up @@ -239,13 +239,13 @@ asyncTest( "change", function() {
shouldChange( false, "value, same value" );
element.spinner( "value", 999 );

shouldChange( true, "max, value changed" );
shouldChange( false, "max, value not changed" );
element.spinner( "option", "max", 900 );

shouldChange( false, "max, value not changed" );
element.spinner( "option", "max", 1000 );

shouldChange( true, "min, value changed" );
shouldChange( false, "min, value not changed" );
element.spinner( "option", "min", 950 );

shouldChange( false, "min, value not changed" );
Expand Down
1 change: 0 additions & 1 deletion ui/spinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ return $.widget( "ui.spinner", {

_setOptions: spinner_modifier(function( options ) {
this._super( options );
this._value( this.element.val() );
}),

_parse: function( val ) {
Expand Down

0 comments on commit 796a8b3

Please sign in to comment.