From: Richard D. Worth Date: Tue, 11 May 2010 11:31:48 +0000 (-0400) Subject: Slider: trim value to min and max when page_up or page_down is pressed. Fixed #5591... X-Git-Tag: 1.8.2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b7c0823da65254f420e4f8affefb4632ecad8f91;p=jquery-ui.git 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 --- diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index 440e75635..895b536c2 100644 --- a/ui/jquery.ui.slider.js +++ b/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: