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)

This commit is contained in:
Andrew Powell 2009-04-19 23:50:48 +00:00
parent dc76df3d07
commit 30ad533948

View File

@ -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();