From: Andrew Powell Date: Sun, 19 Apr 2009 23:50:48 +0000 (+0000) Subject: updated the condition to assert that values.legnth ==2 and range: true. (fixed ... X-Git-Tag: 1.8a1~134 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=30ad5339489749be823757055aefa8311bd598d6;p=jquery-ui.git 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) --- 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();