diff options
author | Richard Worth <rdworth@gmail.com> | 2009-03-10 11:17:21 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2009-03-10 11:17:21 +0000 |
commit | 7e3b8483a351d29d64029eda8e814c07053296f0 (patch) | |
tree | 80736b37445f3d2c67e119b5ca8b569dd1bb433a /ui | |
parent | 4bfadc451477639f88412f9a955214cce4cd68f4 (diff) | |
download | jquery-ui-7e3b8483a351d29d64029eda8e814c07053296f0.tar.gz jquery-ui-7e3b8483a351d29d64029eda8e814c07053296f0.zip |
Fixed #4315 (Slider: clicking on slider with negative values causes error 'closestHandle is undefined')
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.slider.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/ui.slider.js b/ui/ui.slider.js index 10a09f300..24d38cc19 100644 --- a/ui/ui.slider.js +++ b/ui/ui.slider.js @@ -193,7 +193,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { var position = { x: event.pageX, y: event.pageY }; var normValue = this._normValueFromMouse(position); - var distance = this._valueMax() + 1, closestHandle; + var distance = this._valueMax() - this._valueMin() + 1, closestHandle; var self = this, index; this.handles.each(function(i) { var thisDistance = Math.abs(normValue - self.values(i)); |