From 796a8b37e2b7eae6aa0f7a2fcaa5d8c29331e857 Mon Sep 17 00:00:00 2001 From: David Petersen Date: Mon, 19 May 2014 19:29:45 -0500 Subject: [PATCH] Spinner: Don't change value when changing min/max options Fixes #9703 Closes gh-1252 --- tests/unit/spinner/spinner_events.js | 6 +++--- ui/spinner.js | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/unit/spinner/spinner_events.js b/tests/unit/spinner/spinner_events.js index 610f7a2ec..007d34cf7 100644 --- a/tests/unit/spinner/spinner_events.js +++ b/tests/unit/spinner/spinner_events.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" ); diff --git a/ui/spinner.js b/ui/spinner.js index a8795f024..263b29d3f 100644 --- a/ui/spinner.js +++ b/ui/spinner.js @@ -403,7 +403,6 @@ return $.widget( "ui.spinner", { _setOptions: spinner_modifier(function( options ) { this._super( options ); - this._value( this.element.val() ); }), _parse: function( val ) { -- 2.39.5