#9376 closed bug (fixed)
Slider value can be set greater than value of 'max' option
Reported by: | Bacher | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.2 |
Component: | ui.slider | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Slider value can be set greater than value of 'max' option
Example on jsfiddle: http://jsfiddle.net/Bacher/6sdHc/
In this case, I can set value 100.
Change History (12)
comment:1 Changed 10 years ago by
comment:2 follow-up: 4 Changed 10 years ago by
Please have a look at this fix. I added a Slider.html in tests/Visual and modified jquery.ui.slider.js
I am sorry i missed the commit message style {WHAT} .
https://github.com/dekajp/jquery-ui/commit/f6efec156ca716e543b377572737ee990a09ce28
https://github.com/dekajp/jquery-ui/commit/2e05f3bcda3019a8483e298d67c41812475aa3f1
comment:4 Changed 10 years ago by
Replying to dekajp:
Please have a look at this fix. I added a Slider.html in tests/Visual and modified jquery.ui.slider.js
I am sorry i missed the commit message style {WHAT} .
https://github.com/dekajp/jquery-ui/commit/f6efec156ca716e543b377572737ee990a09ce28
https://github.com/dekajp/jquery-ui/commit/2e05f3bcda3019a8483e298d67c41812475aa3f1
Hi @dekajp,
If you are interested in contributing a change please submit it as a pull request. Also we no longer maintain the visual tests and we'll want a unit test for this change.
Thanks.
comment:5 Changed 10 years ago by
@tj Sure , i will update my code and submit a pull request. Thank you for quick feedback !!!
comment:6 Changed 10 years ago by
@tj , I have submitted a pull request. https://github.com/jquery/jquery-ui/pull/1009
Looks like my commit history on my master is not very clean . I do not know if - this is a problem ? Let me know if you want me to rebase and clean my commit history. I am very new to Github :(
comment:7 Changed 10 years ago by
New pull request that should resolve this problem: https://github.com/jquery/jquery-ui/pull/1030
comment:8 Changed 8 years ago by
Status: | new → open |
---|
Most recent PR: https://github.com/jquery/jquery-ui/pull/1016
comment:9 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Slider: Don't allow a slider's value to exceed its max
Fixes #9376 Closes gh-1016
Changeset: 6833a3169775d4c15dd5e68c96bc63ad0187035e
comment:10 Changed 8 years ago by
Milestone: | none → 1.11.2 |
---|
comment:11 Changed 8 years ago by
This fix has caused another issue though. Concerning slider with (float) step value. Example, slider with min=1, max=10, step=1 works great, however slider with min=1, max=2.5, step=0.01 never reaches 2.5 value.
Fiddle:
http://jsfiddle.net/edimov/ku7mL577/14/
Quite nasty, as there is no consistency to incorporate some universal logic to fix with a workaround.
Behavior still occurs on 1.10.3: http://jsfiddle.net/tj_vantoll/TYm77/.
I have mixed feelings about this, technically what is being passed in is invalid because the attributes don't line up.
min
is1
,max
is99
, andstep
is3
. If you change themin
ormax
to correctly be multiples of 3 (thestep
value), this works fine.That being said *maybe* we should support this because I could see it being a bit confusing.