mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Slider: trim to max and min on UP DOWN LEFT RIGHT. Fixed #5591 - Slider: can go outside min and max with keyboard
This commit is contained in:
4
ui/jquery.ui.slider.js
vendored
4
ui/jquery.ui.slider.js
vendored
@@ -191,14 +191,14 @@ $.widget( "ui.slider", $.ui.mouse, {
|
||||
if ( curVal === self._valueMax() ) {
|
||||
return;
|
||||
}
|
||||
newVal = curVal + step;
|
||||
newVal = self._trimAlignValue( curVal + step );
|
||||
break;
|
||||
case $.ui.keyCode.DOWN:
|
||||
case $.ui.keyCode.LEFT:
|
||||
if ( curVal === self._valueMin() ) {
|
||||
return;
|
||||
}
|
||||
newVal = curVal - step;
|
||||
newVal = self._trimAlignValue( curVal - step );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user