Skip to main content

Search and Top Navigation

#1865 closed bug (fixed)

Opened October 31, 2007 01:42AM UTC

Closed February 12, 2008 01:06PM UTC

Last modified February 26, 2009 11:15AM UTC

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:

With this test case:

<div id = "slider" class = "ui-slider-1">
<div id = "sliderThumb" class = "ui-slider-handle"></div>
<input id = "sliderVal" size = "4"/>
<script type = "text/javascript">
$(document).ready(function() {
        minValue: 20,
        maxValue: 40,
        slide: function(e, ui) {

The values assigned to the text field range from 0 to 20 instead of 20 to 40.

Attachments (0)
Change History (6)

Changed October 31, 2007 02:06AM UTC by nostrademons comment:1

Changing line 237 of ui.slider.js from

this.curValue = (Math.round((m/p)*o.realValue));


this.curValue = o.minValue + (Math.round((m/p)*o.realValue));

seems to fix the problem.

Changed November 05, 2007 03:22PM UTC by paul comment:2

owner: → paul
status: newassigned

Changed November 16, 2007 07:06PM UTC by nostrademons comment:3

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.

Changed February 12, 2008 01:06PM UTC by paul comment:4

resolution: → fixed
status: assignedclosed

Sorry, this has been complete redone and is therefore fixed. Thanks.

Changed May 24, 2008 03:39AM UTC by comment:5

milestone: 1.2.2

Milestone 1.2.2 deleted

Changed February 26, 2009 11:15AM UTC by paul comment:6

milestone: → 1.5