diff --git a/ui/ui.slider.js b/ui/ui.slider.js index 91f257157..2b388c6d5 100644 --- a/ui/ui.slider.js +++ b/ui/ui.slider.js @@ -287,7 +287,9 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { if (valueMouseModStep > (this.options.step / 2)) normValue += this.options.step; - return normValue; + // Since JavaScript has problems with large floats, round + // the final value to 5 digits after the decimal point (see #4124) + return parseFloat(normValue.toFixed(5)); },