From b7c0823da65254f420e4f8affefb4632ecad8f91 Mon Sep 17 00:00:00 2001 From: "Richard D. Worth" Date: Tue, 11 May 2010 07:31:48 -0400 Subject: [PATCH] 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 --- ui/jquery.ui.slider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.39.5