Skip to content

#9376 ui.slider: modified , so that slider value can not be set more than max ... #1011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dekajp
Copy link
Contributor

@dekajp dekajp commented Jun 22, 2013

...Fixed #9376 - ui.slider: On mouse move slider sets value more than max

…ax Fixed #9376 - ui.slider: On mouse move slider sets value more than max
};

element.slider( options );
ok(element.slider( "value" ) === options.max, "value method is contained by max" );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is invalid. The highest valid value is 98, not 99. Even though the max option is set to 99, that value should never be reached.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottgonzalez . I think that value 98.67854 can be achieved by dragging the mouse . So we should stop the mouse to go beyond 98 right ?
here is the fiddle - http://jsfiddle.net/tj_vantoll/TYm77/

For example :
min: 1,
max: 9,
step: 3,

Constraint should be 7 right ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And that's a bug. A very closely related bug to what you're trying to fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if slider is drawing 1-9 then we should let user go to 9 . other possible solution will be slider draw to 1-7 override user Max value ? do you see any other solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think from the spec - value will always change by an increment of step, whether by keyboard or mouse

http://wiki.jqueryui.com/w/page/12138059/Slider

Thanks @scottgonzalez

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.max should remain 9, but the effective max should be 7. It should not be possible to set a value greater than 7 through the UI or programmatically.

@scottgonzalez
Copy link
Member

Thanks @dekajp, but we'll need a different constraint in order to land this. I'm going to close this PR, but please do send a new one that conforms to the step.

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

Successfully merging this pull request may close these issues.

2 participants