Search and Top Navigation
#15262 new bug ()
Opened January 02, 2018 07:19PM UTC
Last modified December 14, 2020 10:23AM UTC
Slider max rounded down
Reported by: | jasongrout | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.slider | Version: | 1.12.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In #12852, an issue with floating point roundoff in the slider was fixed.
This new logic still has a problem with the range (0.0, 0.6) and step 0.1: http://jsfiddle.net/f551752v/1/. 0.6 is not reachable in this case - the slider only goes up to 0.5.
Perhaps instead of subtracting a step from max, we could build in the knowledge that the last step may not be a full step and keep the user-set maximum (since that's what the user intended, since it was explicitly set).
Attachments (0)
Change History (2)
Changed October 25, 2018 01:42PM UTC by comment:1
component: | ui.core → ui.slider |
---|
Changed December 14, 2020 10:23AM UTC by comment:2
Created PR with fix https://github.com/jquery/jquery-ui/pull/1940
There is one test case that failed, but I'm not sure that it's the correct one.
The initial issue happens when in the setting I've set 8.003, but in js, it received as 8.0029999...