Permalink
Browse files

Spinner: Don't change value when changing min/max options

Fixes #9703
Closes gh-1252
  • Loading branch information...
petersendidit committed May 20, 2014
1 parent 9a93a06 commit 796a8b37e2b7eae6aa0f7a2fcaa5d8c29331e857
Showing with 3 additions and 4 deletions.
  1. +3 −3 tests/unit/spinner/spinner_events.js
  2. +0 −1 ui/spinner.js
@@ -122,7 +122,7 @@ test( "stop", function() {
});
asyncTest( "change", function() {
expect( 14 );
expect( 12 );
var element = $( "#spin" ).spinner();
function shouldChange( expectation, msg ) {
@@ -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" );
View
@@ -403,7 +403,6 @@ return $.widget( "ui.spinner", {
_setOptions: spinner_modifier(function( options ) {
this._super( options );
this._value( this.element.val() );
}),
_parse: function( val ) {

0 comments on commit 796a8b3

Please sign in to comment.