app/assets/javascripts/jquery.ui.spinner.js in jquery-ui-rails-4.2.0 vs app/assets/javascripts/jquery.ui.spinner.js in jquery-ui-rails-4.2.1
- old
+ new
@@ -1,14 +1,14 @@
//= require jquery.ui.core
//= require jquery.ui.widget
//= require jquery.ui.button
/*!
- * jQuery UI Spinner 1.10.3
+ * jQuery UI Spinner 1.10.4
* http://jqueryui.com
*
- * Copyright 2013 jQuery Foundation and other contributors
+ * Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/spinner/
*
@@ -29,11 +29,11 @@
}
};
}
$.widget( "ui.spinner", {
- version: "1.10.3",
+ version: "1.10.4",
defaultElement: "<input>",
widgetEventPrefix: "spin",
options: {
culture: null,
icons: {
@@ -57,11 +57,15 @@
// handle string values that need to be parsed
this._setOption( "max", this.options.max );
this._setOption( "min", this.options.min );
this._setOption( "step", this.options.step );
- // format the value, but don't constrain
- this._value( this.element.val(), true );
+ // Only format if there is a value, prevents the field from being marked
+ // as invalid in Firefox, see #9573.
+ if ( this.value() !== "" ) {
+ // Format the value, but don't constrain.
+ this._value( this.element.val(), true );
+ }
this._draw();
this._on( this._events );
this._refresh();