mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Slider: trim value to min and max when page_up or page_down is pressed. Fixed #5591 - Slider: can go below its defined minimum with PageDown
This commit is contained in:
parent
b53b48b618
commit
b7c0823da6
4
ui/jquery.ui.slider.js
vendored
4
ui/jquery.ui.slider.js
vendored
@ -181,10 +181,10 @@ $.widget( "ui.slider", $.ui.mouse, {
|
|||||||
newVal = self._valueMax();
|
newVal = self._valueMax();
|
||||||
break;
|
break;
|
||||||
case $.ui.keyCode.PAGE_UP:
|
case $.ui.keyCode.PAGE_UP:
|
||||||
newVal = curVal + ( (self._valueMax() - self._valueMin()) / numPages );
|
newVal = self._trimAlignValue( curVal + ( (self._valueMax() - self._valueMin()) / numPages ) );
|
||||||
break;
|
break;
|
||||||
case $.ui.keyCode.PAGE_DOWN:
|
case $.ui.keyCode.PAGE_DOWN:
|
||||||
newVal = curVal - ( (self._valueMax() - self._valueMin()) / numPages );
|
newVal = self._trimAlignValue( curVal - ( (self._valueMax() - self._valueMin()) / numPages ) );
|
||||||
break;
|
break;
|
||||||
case $.ui.keyCode.UP:
|
case $.ui.keyCode.UP:
|
||||||
case $.ui.keyCode.RIGHT:
|
case $.ui.keyCode.RIGHT:
|
||||||
|
Loading…
Reference in New Issue
Block a user