From 4bfadc451477639f88412f9a955214cce4cd68f4 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Tue, 10 Mar 2009 01:35:09 +0000 Subject: [PATCH] Fixed #4292 (Slider: ui.value incorrect in slide event if handle at value 0) --- ui/ui.slider.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/ui.slider.js b/ui/ui.slider.js index 32b746689..10a09f300 100644 --- a/ui/ui.slider.js +++ b/ui/ui.slider.js @@ -299,11 +299,15 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { }, _start: function(event, index) { - this._trigger("start", event, { + var uiHash = { handle: this.handles[index], - value: this.value(), - values: this.values() - }); + value: this.value() + }; + if (this.options.values && this.options.values.length) { + uiHash.value = this.values(index) + uiHash.values = this.values() + } + this._trigger("start", event, uiHash); }, _slide: function(event, index, newVal) {