Skip to content
Permalink
Browse files

Slider: Create a copy of the options.values array for the return valu…

…e of _value(). Fixes #4751 - Dragging slider modifies values, even if callback returns false.

Thanks bkrausz.
  • Loading branch information
scottgonzalez committed Aug 4, 2009
1 parent aacecd6 commit 1a28670720cbc815647d42a045a2fac44c0cd479
Showing with 3 additions and 1 deletion.
  1. +3 −1 ui/ui.slider.js
@@ -482,7 +482,9 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {

return val;
} else {
return this.options.values;
// .slice() creates a copy of the array
// this prevents outside manipulation of the internal state
return this.options.values.slice();
}

},

0 comments on commit 1a28670

Please sign in to comment.
You can’t perform that action at this time.