Slider: Create a copy of the options.values array for the return value of _value(). Fixes #4751 - Dragging slider modifies values, even if callback returns false.

Thanks bkrausz.
This commit is contained in:
Scott González 2009-08-04 23:35:08 +00:00
parent aacecd6450
commit 1a28670720

View File

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