We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d2ac1a commit fb5cad3Copy full SHA for fb5cad3
ui/jquery.ui.spinner.js
@@ -84,7 +84,13 @@ $.widget( "ui.spinner", {
84
uiSpinner.addClass( "ui-state-active" );
85
},
86
blur: function( event ) {
87
- this.value( this.element.val() );
+ // don't clear invalid values on blur
88
+ var value = this.element.val(),
89
+ parsed = this._parse( value );
90
+ this.option( "value", parsed );
91
+ if ( parsed === null ) {
92
+ this.element.val( value );
93
+ }
94
// TODO: is this really correct or just the simplest
95
// way to keep the active class when pressing the buttons?
96
// if the mosue is over the text field and the user tabs out
0 commit comments