Skip to main content

Search and Top Navigation

#7837 closed bug (worksforme)

Opened November 07, 2011 08:27PM UTC

Closed November 07, 2011 08:46PM UTC

Last modified November 07, 2011 08:54PM UTC

Slider Value Off By One When Changing Directions

Reported by: lyden Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.slider Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:
Description

After a slide event is fired, the slider returns the wrong value if the handle has just changed directions. If a default horizontal slider is increased to value 50, then pulled one step to the right, the value correctly increases to 51. If the slider is then pulled one step to the left, the value will INCREASE to 52. If the slider is then pulled another step to the left, the value will decrease to 51 and continue decreasing as long as the slider continues to be pulled to the left. The opposite also holds true. If a default horizontal slider decreased to value 50, then pulled one step to the left, the value correctly decreases to 49. If the slider is then pulled one step to the right, the value will DECREASE to 48 and then will increment normally as it's continued to be pulled to the right. Consequently, it's possible to slide one step left to INCREMENT by one, and then slide one step right to DECREMENT by one. This behavior is particular to the slide event. The change and stop events function as expected. This was noted in a minimalist test using both the latest versions of Chrome and Firefox on Windows 7.

Attachments (0)
Change History (2)

Changed November 07, 2011 08:46PM UTC by scottgonzalez comment:1

resolution: → worksforme
status: newclosed

We're not seeing the behavior you describe.

Changed November 07, 2011 08:54PM UTC by rdworth comment:2

My guess is that inside the slide event you are using $(this).slider("value") when you need to use ui.value. The former is the current/previous value. The latter is the next/new value. Both are provided as they are sometimes needed for comparison.