slider: closestHandle never got set when the distance between the handles are the maximum available (fixes #3948)

This commit is contained in:
Paul Bakaus 2009-01-28 19:14:38 +00:00
parent bf6b493c90
commit 1ad50e24a9

View File

@ -185,7 +185,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
var position = { x: event.pageX, y: event.pageY };
var normValue = this._normValueFromMouse(position);
var distance = this._valueMax(), closestHandle;
var distance = this._valueMax() + 1, closestHandle;
var self = this, index;
this.handles.each(function(i) {
var thisDistance = Math.abs(normValue - self.values(i));