aboutsummaryrefslogtreecommitdiffstats
path: root/ui/slider.js
diff options
context:
space:
mode:
authorAblay Keldibek <atomio.ak@gmail.com>2015-03-16 15:10:23 +0600
committerScott González <scott.gonzalez@gmail.com>2015-03-18 10:49:01 -0400
commitdff1c74dd4c0fd6b951c7c183bebae09f9f229f6 (patch)
treec869ec09650bb29774438734b493e68f6071ccd4 /ui/slider.js
parent868e8c70e391b5ba886edc93fdec28086a6a3fca (diff)
downloadjquery-ui-dff1c74dd4c0fd6b951c7c183bebae09f9f229f6.tar.gz
jquery-ui-dff1c74dd4c0fd6b951c7c183bebae09f9f229f6.zip
Slider: Fix handle order when setting values of range slider to max
When both values are set to the maximum change them in descending order Fixes #9046 Closes gh-1502
Diffstat (limited to 'ui/slider.js')
-rw-r--r--ui/slider.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/slider.js b/ui/slider.js
index 094f0135d..4ca9c6002 100644
--- a/ui/slider.js
+++ b/ui/slider.js
@@ -453,7 +453,9 @@ return $.widget( "ui.slider", $.ui.mouse, {
case "values":
this._animateOff = true;
this._refreshValue();
- for ( i = 0; i < valsLength; i += 1 ) {
+
+ // Start from the last handle to prevent unreachable handles (#9046)
+ for ( i = valsLength - 1; i >= 0; i-- ) {
this._change( null, i );
}
this._animateOff = false;