Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Should the input step its value #11

Open
johnparn opened this issue Jul 3, 2013 · 2 comments
Open

Should the input step its value #11

johnparn opened this issue Jul 3, 2013 · 2 comments

Comments

@johnparn
Copy link
Contributor

johnparn commented Jul 3, 2013

We need to review the stepping of values.

See the second example on the demo page - the slider increases 5 steps when changing the value of the input from 2 to 3. Apparently the slider is cieling the value and correctly snaps the slider handle to next coming value. However the value of the input isn't changing. Perhaps the value of the input should step as well?

@ProLoser
Copy link
Member

ProLoser commented Jul 3, 2013

That may be considered a validation pattern or something. I'm not sure why the slider moves at all with invalid values though.

@johnparn
Copy link
Contributor Author

johnparn commented Jul 4, 2013

I believe the value of the slider is rounded in order to snap to the steps. In the second example with step 5 set, if one drags the slider handle just above where 3 is suppose to be, the handle snaps to value 5 and on the other hand if one drags the handle just below 3 it snaps to 0. That would make sense why the handle is moving at odd values.

In the jquery ui slider source it most likely is the method at row 514, _trimAlignValue, that is responsible for this.
https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.slider.js

Or did you mean something else that is broken?

// John

On 20130704,, at 0:25 , Dean Sofer wrote:

That may be considered a validation pattern or something. I'm not sure why the slider moves at all with invalid values though.


Reply to this email directly or view it on GitHub.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants