#11286 closed bug (fixed)
Slider: Cannot reach max value with step of 0.01
Reported by: | groonya | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 1.11.4 |
Component: | ui.slider | Version: | 1.11.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I've created a slider with values from 50 to 60 with a 0.01 step. The lower bound works just fine, but the max value is never able to be reached via the slider.
Here's a jsfiddle example:
http://jsfiddle.net/v13t8cmj/7/
The slider in the example should go to 60, however it stops at 59.99.
Similar bug was in 1.11.2 for 0.1 step: http://bugs.jqueryui.com/ticket/10721
Change History (6)
comment:1 Changed 9 years ago by
Milestone: | none → 1.12.0 |
---|---|
Priority: | minor → blocker |
Status: | new → open |
Summary: | Cannot reach max value with step of 0.01 → Slider: Cannot reach max value with step of 0.01 |
comment:2 Changed 9 years ago by
comment:3 Changed 9 years ago by
I think the problem in "_calculateNewMax" method, because it takes max (for example 2.4) and turns it to 2.39. The problem is that js calculate: 2.4 - 2 = 0.39999999.
comment:4 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Slider: Modified to allow value to reach max value with float step
Fixes #11286 Closes gh-1465
Changeset: 60c00cd4ecdab41f44e125efe2679223e9cd5535
comment:5 Changed 9 years ago by
Slider: Modified to allow value to reach max value with float step
Fixes #11286 Closes gh-1465 (cherry picked from commit 60c00cd4ecdab41f44e125efe2679223e9cd5535)
Changeset: 0f99e9c9693b05199d9f8c1137606c7033e19f38
comment:6 Changed 9 years ago by
Milestone: | 1.12.0 → 1.11.4 |
---|
I mistake. For integer values is all ok. But for float... Look at this: http://jsfiddle.net/v13t8cmj/9/