Skip to content

Commit 114c001

Browse files
committed
Slider: trim to max and min on UP DOWN LEFT RIGHT. Fixed #5591 - Slider: can go outside min and max with keyboard
1 parent 5fd1580 commit 114c001

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.slider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ $.widget( "ui.slider", $.ui.mouse, {
191191
if ( curVal === self._valueMax() ) {
192192
return;
193193
}
194-
newVal = curVal + step;
194+
newVal = self._trimAlignValue( curVal + step );
195195
break;
196196
case $.ui.keyCode.DOWN:
197197
case $.ui.keyCode.LEFT:
198198
if ( curVal === self._valueMin() ) {
199199
return;
200200
}
201-
newVal = curVal - step;
201+
newVal = self._trimAlignValue( curVal - step );
202202
break;
203203
}
204204

0 commit comments

Comments
 (0)