From: Richard Worth Date: Thu, 5 Feb 2009 06:01:10 +0000 (+0000) Subject: Fixed 4062 - slider: vertical slider handle jumps up when you click on it X-Git-Tag: 1.6~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5a6e2bdbb6838e56b2f6ea52c1ada3bdb5ac6f86;p=jquery-ui.git Fixed 4062 - slider: vertical slider handle jumps up when you click on it --- diff --git a/ui/ui.slider.js b/ui/ui.slider.js index f96767b49..b1d4af1a1 100644 --- a/ui/ui.slider.js +++ b/ui/ui.slider.js @@ -214,7 +214,11 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { var mouseOverHandle = !$(event.target).parents().andSelf().is('.ui-slider-handle'); this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { left: event.pageX - offset.left + (parseInt(closestHandle.css('marginLeft'),10) || 0), - top: event.pageY - offset.top + (parseInt(closestHandle.css('marginTop'),10) || 0) + top: event.pageY - offset.top + - (closestHandle.height() / 2) + - (parseInt(closestHandle.css('borderTopWidth'),10) || 0) + - (parseInt(closestHandle.css('borderBottomWidth'),10) || 0) + + (parseInt(closestHandle.css('marginTop'),10) || 0) }; normValue = this._normValueFromMouse(position);