Skip to content

Commit a1eb5f4

Browse files
committed
Spinner: Make sure that options.value and input.val() are in sync
1 parent 23157be commit a1eb5f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.spinner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ $.widget('ui.spinner', {
243243
}
244244

245245
// TODO refactor, maybe figure out some non-linear math
246-
var newVal = this.options.value + step * (this.options.incremental &&
246+
var newVal = this.value() + step * (this.options.incremental &&
247247
this.counter > 20
248248
? this.counter > 100
249249
? this.counter > 200
@@ -355,7 +355,7 @@ $.widget('ui.spinner', {
355355

356356
value: function(newVal) {
357357
if (!arguments.length) {
358-
return this.options.value;
358+
return this._parse(this.element.val());
359359
}
360360
this.option('value', newVal);
361361
},

0 commit comments

Comments
 (0)