#1865 closed bug (fixed)
slider curValue ignores minValue
Reported by: | nostrademons | Owned by: | paul |
---|---|---|---|
Priority: | major | Milestone: | 1.5 |
Component: | ui.core | Version: | 1.2.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
With this test case:
<div id = "slider" class = "ui-slider-1"> <div id = "sliderThumb" class = "ui-slider-handle"></div> </div> <input id = "sliderVal" size = "4"/> <script type = "text/javascript"> $(document).ready(function() { $('#slider').slider({ minValue: 20, maxValue: 40, slide: function(e, ui) { $('#sliderVal').val(ui.slider.curValue); } }); });
The values assigned to the text field range from 0 to 20 instead of 20 to 40.
Change History (6)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Owner: | set to paul |
---|---|
Status: | new → assigned |
comment:3 Changed 15 years ago by
After more investigation, this seems to be a documentation bug. The correct value is returned by ui.value and ui.values, but the documentation says to use ui.slider.curValue. The patch above breaks other things (notably, the values returned by ui.value and ui.values), so disregard it and fix the documentation so that people don't use the wrong interface.
comment:4 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Sorry, this has been complete redone and is therefore fixed. Thanks.
comment:6 Changed 14 years ago by
Milestone: | → 1.5 |
---|
Note: See
TracTickets for help on using
tickets.
Changing line 237 of ui.slider.js from
to
seems to fix the problem.