Skip to content
Permalink
Browse files

Fixed 4062 - slider: vertical slider handle jumps up when you click o…

…n it
  • Loading branch information
rdworth committed Feb 5, 2009
1 parent 21b7b8c commit 5a6e2bdbb6838e56b2f6ea52c1ada3bdb5ac6f86
Showing with 5 additions and 1 deletion.
  1. +5 −1 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);

0 comments on commit 5a6e2bd

Please sign in to comment.
You can’t perform that action at this time.