Search and Top Navigation
#8048 closed bug (notabug)
Opened January 23, 2012 03:18PM UTC
Closed January 23, 2012 03:58PM UTC
Problems with steps
Reported by: | yop289 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.slider | Version: | 1.8.16 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi, I think that is a minor bug in ui.slider with step option:
I set to step: 12
- If you begin to move slider from 500 the first step should be 488, and ui slider set it to 492.
- If you move again the slider to top it set to 504, a not to 500.
- if you move the slider to 0 it should stop on 12, but it goes to 0.
thanks a lot for your great work
Attachments (0)
Change History (1)
Changed January 23, 2012 03:58PM UTC by comment:1
description: | Hi, I think that is a minor bug in ui.slider with step option: \ \ http://jsfiddle.net/fVfXb/ \ \ I set to step: 12 \ \ If you begin to move slider from 500 the first step should be 488, and ui slider set it to 492. \ If you move again the slider to top it set to 504, a not to 500. \ if you move the slider to 0 it should stop on 12, but it goes to 0. \ \ thanks a lot for your great work → Hi, I think that is a minor bug in ui.slider with step option: \ \ http://jsfiddle.net/fVfXb/ \ \ I set to step: 12 \ \ * If you begin to move slider from 500 the first step should be 488, and ui slider set it to 492. \ * If you move again the slider to top it set to 504, a not to 500. \ * if you move the slider to 0 it should stop on 12, but it goes to 0. \ \ thanks a lot for your great work |
---|---|
resolution: | → invalid |
status: | new → closed |
The step counts up from the min (0) not down from the max (500), 492 is evenly divisible by 12, 488 is not
The slider hasn't actually moved to the value 504, you have been given a notice in the slide event by way of the ui.values argument that the user requested the value be set to 504. After the event, the max constraint is enforced, and if you check .slider("values") you'll see the top value never does exceed the max
I'm not sure why you feel the slider shouldn't go to 0 as you've set the min to 0. If you want 12 to be the lowest possible value, set the min to 12
All the behaviors as per your description and the attached fiddle are as designed.