Skip to content

Commit

Permalink
Fixed #4315 (Slider: clicking on slider with negative values causes e…
Browse files Browse the repository at this point in the history
…rror 'closestHandle is undefined')
  • Loading branch information
rdworth committed Mar 10, 2009
1 parent 4bfadc4 commit 7e3b848
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/ui.slider.js
Expand Up @@ -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));
Expand Down

0 comments on commit 7e3b848

Please sign in to comment.