Bug Tracker

Opened 12 years ago

Closed 12 years ago

#2366 closed bug (fixed)

slider with two handles: When stepping < 1/4 of realMaxValue ->wrong steps created

Reported by: nettoyeur Owned by: braeker
Priority: major Milestone: 1.2.4
Component: ui Version: 1.2.3
Keywords: slider, stepping, jqueryui Cc:
Blocked by: Blocking:


ui.slider.js, r4730

When minValue=0 and stepping is smaller then 1/4 of maxvalue, it fails to create the proper steps (rounding error?)

how to reproduce: Create slider with two handles.


->everything ok, steps of 250 are taken

Now try smaller stepping:


->first step with left slider is 196.8085106382979, second step is 398.93617021276594, third step is 595.7446808510638, fourth step is 797.8723404255319, fifth step is 1000. (expected: 200,400,600,800,1000)

Attachments (1)

ui_slider_value_round_on_stepping.diff (1.2 KB) - added by zimbatm 12 years ago.
Round value() if stepping

Download all attachments as: .zip

Change History (7)

comment:1 Changed 12 years ago by paul

Owner: changed from paul to braeker

comment:2 Changed 12 years ago by tfe

This also occurs in single-handle sliders.

comment:3 Changed 12 years ago by tfe

Also, I could really use a fix for this issue ASAP. I need to use 1.5b to be able to use a slider with multiple handles, but using 1.5b also breaks my sliders with this bug.

comment:4 Changed 12 years ago by zimbatm

This is because .value() calculates itself from the position of the element instead of the current position on the stepping

Changed 12 years ago by zimbatm

Round value() if stepping

comment:5 Changed 12 years ago by zimbatm

Please apply the patch. tests are passing

comment:6 Changed 12 years ago by scott.gonzal

Resolution: fixed
Status: newclosed

Fixed in [4963].

Note: See TracTickets for help on using tickets.