From 5a6e2bdbb6838e56b2f6ea52c1ada3bdb5ac6f86 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Thu, 5 Feb 2009 06:01:10 +0000 Subject: [PATCH] Fixed 4062 - slider: vertical slider handle jumps up when you click on it --- ui/ui.slider.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.39.5