]> source.dussan.org Git - jquery-ui.git/commitdiff
Slider: trim to max and min on UP DOWN LEFT RIGHT. Fixed #5591 - Slider: can go outsi...
authorRichard D. Worth <rdworth@gmail.com>
Tue, 11 May 2010 12:36:56 +0000 (08:36 -0400)
committerRichard D. Worth <rdworth@gmail.com>
Tue, 11 May 2010 12:36:56 +0000 (08:36 -0400)
ui/jquery.ui.slider.js

index 210ca769a93c245616418c8fce83d1f9a8fee0be..71b52ce37d75fdef4a587d215ec2bf725f5bcf44 100644 (file)
@@ -191,14 +191,14 @@ $.widget( "ui.slider", $.ui.mouse, {
                                                if ( curVal === self._valueMax() ) {
                                                        return;
                                                }
-                                               newVal = curVal + step;
+                                               newVal = self._trimAlignValue( curVal + step );
                                                break;
                                        case $.ui.keyCode.DOWN:
                                        case $.ui.keyCode.LEFT:
                                                if ( curVal === self._valueMin() ) {
                                                        return;
                                                }
-                                               newVal = curVal - step;
+                                               newVal = self._trimAlignValue( curVal - step );
                                                break;
                                }