mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00: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:
parent
5fd158053f
commit
114c001aba
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() ) {
|
if ( curVal === self._valueMax() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
newVal = curVal + step;
|
newVal = self._trimAlignValue( curVal + step );
|
||||||
break;
|
break;
|
||||||
case $.ui.keyCode.DOWN:
|
case $.ui.keyCode.DOWN:
|
||||||
case $.ui.keyCode.LEFT:
|
case $.ui.keyCode.LEFT:
|
||||||
if ( curVal === self._valueMin() ) {
|
if ( curVal === self._valueMin() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
newVal = curVal - step;
|
newVal = self._trimAlignValue( curVal - step );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user