Skip to main content

Search and Top Navigation

#11286 closed bug (fixed)

Opened March 03, 2015 10:18AM UTC

Closed March 05, 2015 06:17PM UTC

Last modified March 10, 2015 04:33PM UTC

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

Attachments (0)
Change History (6)

Changed March 03, 2015 01:32PM UTC by scottgonzalez comment:1

milestone: none1.12.0
priority: minorblocker
status: newopen
summary: Cannot reach max value with step of 0.01Slider: Cannot reach max value with step of 0.01

Changed March 03, 2015 02:55PM UTC by groonya comment:2

I mistake. For integer values is all ok.

But for float...

Look at this:

http://jsfiddle.net/v13t8cmj/9/

Changed March 04, 2015 11:21AM UTC by atomiomi comment:3

_comment0: I think the problem in "_calculateNewMax" method, because it take max (for example 2.4) and transformate it to 2.39. The problem is - js calulate: 2.4 - 2 = 0.39999999. 1425468577078724

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.

Changed March 05, 2015 06:17PM UTC by Ablay Keldibek comment:4

resolution: → fixed
status: openclosed

Slider: Modified to allow value to reach max value with float step

Fixes #11286

Closes gh-1465

Changeset: 60c00cd4ecdab41f44e125efe2679223e9cd5535

Changed March 10, 2015 04:31PM UTC by Ablay Keldibek comment:5

Slider: Modified to allow value to reach max value with float step

Fixes #11286

Closes gh-1465

(cherry picked from commit 60c00cd4ecdab41f44e125efe2679223e9cd5535)

Changeset: 0f99e9c9693b05199d9f8c1137606c7033e19f38

Changed March 10, 2015 04:33PM UTC by scottgonzalez comment:6

milestone: 1.12.01.11.4