Skip to content

Commit

Permalink
updated the condition to assert that values.legnth ==2 and range: tru…
Browse files Browse the repository at this point in the history
…e. (fixed #3736 - Slider: some handles get stuck when using two or more handles)
  • Loading branch information
Andrew Powell committed Apr 19, 2009
1 parent dc76df3 commit 30ad533
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/ui.slider.js
Expand Up @@ -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();
Expand Down

0 comments on commit 30ad533

Please sign in to comment.