Skip to content
Browse files

Slider: trim value to min and max when page_up or page_down is presse…

…d. Fixed #5591 - Slider: can go below its defined minimum with PageDown
  • Loading branch information...
1 parent b53b48b commit b7c0823da65254f420e4f8affefb4632ecad8f91 @rdworth rdworth committed May 11, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/jquery.ui.slider.js
View
4 ui/jquery.ui.slider.js
@@ -181,10 +181,10 @@ $.widget( "ui.slider", $.ui.mouse, {
newVal = self._valueMax();
break;
case $.ui.keyCode.PAGE_UP:
- newVal = curVal + ( (self._valueMax() - self._valueMin()) / numPages );
+ newVal = self._trimAlignValue( curVal + ( (self._valueMax() - self._valueMin()) / numPages ) );
break;
case $.ui.keyCode.PAGE_DOWN:
- newVal = curVal - ( (self._valueMax() - self._valueMin()) / numPages );
+ newVal = self._trimAlignValue( curVal - ( (self._valueMax() - self._valueMin()) / numPages ) );
break;
case $.ui.keyCode.UP:
case $.ui.keyCode.RIGHT:

0 comments on commit b7c0823

Please sign in to comment.
Something went wrong with that request. Please try again.