aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.slider.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.slider.js')
-rw-r--r--ui/jquery.ui.slider.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index d90a7940f..d3b4744e3 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -309,7 +309,9 @@ $.widget( "ui.slider", $.ui.mouse, {
( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
};
- this._slide( event, index, normValue );
+ if ( !this.handles.hasClass( "ui-state-hover" ) ) {
+ this._slide( event, index, normValue );
+ }
this._animateOff = true;
return true;
},
@@ -583,14 +585,14 @@ $.widget( "ui.slider", $.ui.mouse, {
// returns the step-aligned value that val is closest to, between (inclusive) min and max
_trimAlignValue: function( val ) {
- if ( val < this._valueMin() ) {
+ if ( val <= this._valueMin() ) {
return this._valueMin();
}
- if ( val > this._valueMax() ) {
+ if ( val >= this._valueMax() ) {
return this._valueMax();
}
var step = ( this.options.step > 0 ) ? this.options.step : 1,
- valModStep = val % step,
+ valModStep = (val - this._valueMin()) % step;
alignValue = val - valModStep;
if ( Math.abs(valModStep) * 2 >= step ) {