diff options
author | David Petersen <public@petersendidit.com> | 2014-05-19 19:29:45 -0500 |
---|---|---|
committer | David Petersen <public@petersendidit.com> | 2014-05-26 11:31:31 -0500 |
commit | 796a8b37e2b7eae6aa0f7a2fcaa5d8c29331e857 (patch) | |
tree | 0fd535bbbbc9fc09af796364ad067c08753331a2 | |
parent | 9a93a06fbd61013f1e62cea054c92e11dfa561f1 (diff) | |
download | jquery-ui-796a8b37e2b7eae6aa0f7a2fcaa5d8c29331e857.tar.gz jquery-ui-796a8b37e2b7eae6aa0f7a2fcaa5d8c29331e857.zip |
Spinner: Don't change value when changing min/max options
Fixes #9703
Closes gh-1252
-rw-r--r-- | tests/unit/spinner/spinner_events.js | 6 | ||||
-rw-r--r-- | 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 ) { |