From 30ad5339489749be823757055aefa8311bd598d6 Mon Sep 17 00:00:00 2001 From: Andrew Powell Date: Sun, 19 Apr 2009 23:50:48 +0000 Subject: [PATCH] updated the condition to assert that values.legnth ==2 and range: true. (fixed #3736 - Slider: some handles get stuck when using two or more handles) --- ui/ui.slider.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/ui.slider.js b/ui/ui.slider.js index 2f5ac1e7b..e011043ea 100644 --- a/ui/ui.slider.js +++ b/ui/ui.slider.js @@ -336,8 +336,10 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { var otherVal = this.values(index ? 0 : 1); - if ((index == 0 && newVal >= otherVal) || (index == 1 && newVal <= otherVal)) - newVal = otherVal; + if ((this.options.values.length == 2 && this.options.range === true) && + ((index == 0 && newVal > otherVal) || (index == 1 && newVal < otherVal))){ + newVal = otherVal; + } if (newVal != this.values(index)) { var newValues = this.values();