aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.slider.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ui.slider.js')
-rw-r--r--ui/ui.slider.js4
1 files changed, 3 insertions, 1 deletions
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));
},