]> source.dussan.org Git - jquery-ui.git/commitdiff
Slider: trim value to min and max when page_up or page_down is pressed. Fixed #5591...
authorRichard D. Worth <rdworth@gmail.com>
Tue, 11 May 2010 11:31:48 +0000 (07:31 -0400)
committerRichard D. Worth <rdworth@gmail.com>
Tue, 11 May 2010 11:31:48 +0000 (07:31 -0400)
ui/jquery.ui.slider.js

index 440e756359166a2fbc6344f198fc80b94a6fc69f..895b536c22a2de0e6e1dba376da8432619f5ad73 100644 (file)
@@ -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: